Throwable Constructors

Definition

Overloads

Throwable()

Constructs a new throwable with null as its detail message.

Throwable(Throwable)

Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

Throwable(String)

Constructs a new throwable with the specified detail message.

Throwable(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Throwable(String, Throwable)

Constructs a new throwable with the specified detail message and cause.

Throwable(String, Throwable, Boolean, Boolean)

Constructs a new throwable with the specified detail message, cause, #addSuppressed suppression enabled or disabled, and writable stack trace enabled or disabled.

Throwable()

Constructs a new throwable with null as its detail message.

[Android.Runtime.Register(".ctor", "()V", "")]
public Throwable ();
Attributes

Remarks

Java documentation for java.lang.Throwable.Throwable().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Throwable(Throwable)

Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

[Android.Runtime.Register(".ctor", "(Ljava/lang/Throwable;)V", "")]
public Throwable (Java.Lang.Throwable? cause);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Throwable;)V", "")>]
new Java.Lang.Throwable : Java.Lang.Throwable -> Java.Lang.Throwable

Parameters

cause
Throwable

the cause (which is saved for later retrieval by the #getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

Attributes

Remarks

Java documentation for java.lang.Throwable.Throwable(java.lang.Throwable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Throwable(String)

Constructs a new throwable with the specified detail message.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public Throwable (string? message);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Lang.Throwable : string -> Java.Lang.Throwable

Parameters

message
String

the detail message. The detail message is saved for later retrieval by the #getMessage() method.

Attributes

Remarks

Java documentation for java.lang.Throwable.Throwable(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Throwable(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

public Throwable (IntPtr handle, Android.Runtime.JniHandleOwnership transfer);
new Java.Lang.Throwable : nativeint * Android.Runtime.JniHandleOwnership -> Java.Lang.Throwable

Parameters

handle
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle handle

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Throwable(String, Throwable)

Constructs a new throwable with the specified detail message and cause.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "")]
public Throwable (string? message, Java.Lang.Throwable? cause);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "")>]
new Java.Lang.Throwable : string * Java.Lang.Throwable -> Java.Lang.Throwable

Parameters

message
String

the detail message (which is saved for later retrieval by the #getMessage() method).

cause
Throwable

the cause (which is saved for later retrieval by the #getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

Attributes

Remarks

Java documentation for java.lang.Throwable.Throwable(java.lang.String, java.lang.Throwable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Throwable(String, Throwable, Boolean, Boolean)

Constructs a new throwable with the specified detail message, cause, #addSuppressed suppression enabled or disabled, and writable stack trace enabled or disabled.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;ZZ)V", "")]
protected Throwable (string? message, Java.Lang.Throwable? cause, bool enableSuppression, bool writableStackTrace);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;ZZ)V", "")>]
new Java.Lang.Throwable : string * Java.Lang.Throwable * bool * bool -> Java.Lang.Throwable

Parameters

message
String

the detail message.

cause
Throwable

the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

enableSuppression
Boolean

whether or not suppression is enabled or disabled

writableStackTrace
Boolean

whether or not the stack trace should be writable

Attributes

Remarks

Java documentation for java.lang.Throwable.Throwable(java.lang.String, java.lang.Throwable, boolean, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to