Throwable Throwable Class

Definition

The superclass of all classes which can be thrown by the VM.

[Android.Runtime.Register("java/lang/Throwable", ApiSince=1, DoNotGenerateAcw=true)]
public class Throwable : Exception, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable
type Throwable = class
    inherit Exception
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
ThrowableThrowable
Derived
Attributes
Implements

Remarks

Android platform documentation

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.

Constructors

Throwable() Throwable()

Constructs a new Throwable that includes the current stack trace.

Throwable(Throwable) Throwable(Throwable)

Constructs a new Throwable with the current stack trace and the given cause.

Throwable(String) Throwable(String)

Constructs a new Throwable with the current stack trace and the given detail message.

Throwable(IntPtr, JniHandleOwnership) Throwable(IntPtr, JniHandleOwnership)

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

Throwable(String, Throwable) Throwable(String, Throwable)

Constructs a new Throwable with the current stack trace, the given detail message and cause.

Throwable(String, Throwable, Boolean, Boolean) Throwable(String, Throwable, Boolean, Boolean)

Constructs a new Throwable with the current stack trace, the specified detail message and the specified cause.

Fields

is_generated is_generated

Properties

Cause Cause

Returns the cause of this Throwable, or null if there is no cause.

Class Class
Handle Handle

The handle to the underlying Android instance.

JniIdentityHashCode JniIdentityHashCode
JniPeerMembers JniPeerMembers
LocalizedMessage LocalizedMessage

Returns the detail message which was provided when this Throwable was created.

Message Message

Returns the detail message which was provided when this Throwable was created.

PeerReference PeerReference
StackTrace StackTrace
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

AddSuppressed(Throwable) AddSuppressed(Throwable)

Adds throwable to the list of throwables suppressed by this.

Dispose() Dispose()
Dispose(Boolean) Dispose(Boolean)
FillInStackTrace() FillInStackTrace()

Records the stack trace from the point where this method has been called to this Throwable.

Finalize() Finalize()
FromException(Exception) FromException(Exception)

Converts a Exception into a Throwable.

GetStackTrace() GetStackTrace()

Returns a clone of the array of stack trace elements of this Throwable.

GetSuppressed() GetSuppressed()

Returns the throwables suppressed by this.

InitCause(Throwable) InitCause(Throwable)

Initializes the cause of this Throwable.

PrintStackTrace(PrintWriter) PrintStackTrace(PrintWriter)

Writes a printable representation of this Throwable's stack trace to the specified print writer.

PrintStackTrace(PrintStream) PrintStackTrace(PrintStream)

Writes a printable representation of this Throwable's stack trace to the given print stream.

PrintStackTrace() PrintStackTrace()

Writes a printable representation of this Throwable's stack trace to the System.err stream.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

SetStackTrace(StackTraceElement[]) SetStackTrace(StackTraceElement[])

Sets the array of stack trace elements.

ToException(Throwable) ToException(Throwable)
ToString() ToString()
UnregisterFromRuntime() UnregisterFromRuntime()

Explicit Interface Implementations

IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation
IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle()
IJavaPeerable.Disposed() IJavaPeerable.Disposed()
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced()
IJavaPeerable.Finalized() IJavaPeerable.Finalized()
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference)

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to