Throwable Class

Definition

The Throwable class is the superclass of all errors and exceptions in the Java language.

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

Remarks

Java documentation for 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.

Constructors

Throwable()

Constructs a new throwable with null as its detail message.

Throwable(IntPtr, JniHandleOwnership)

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

Throwable(String)

Constructs a new throwable with null as its detail message.

Throwable(String, Throwable)

Constructs a new throwable with null as its detail message.

Throwable(String, Throwable, Boolean, Boolean)

Constructs a new throwable with null as its detail message.

Throwable(Throwable)

Constructs a new throwable with null as its detail message.

Fields

is_generated

Properties

Cause

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Class
Handle

The handle to the underlying Android instance.

JniIdentityHashCode
JniPeerMembers
LocalizedMessage

Creates a localized description of this throwable.

Message

Returns the detail message string of this throwable.

PeerReference
StackTrace
ThresholdClass

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

ThresholdType

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

Methods

AddSuppressed(Throwable)

Appends the specified exception to the exceptions that were suppressed in order to deliver this exception.

Dispose()
Dispose(Boolean)
FillInStackTrace()

Fills in the execution stack trace.

Finalize()
FromException(Exception)

Converts a Exception into a Throwable.

GetStackTrace()

Provides programmatic access to the stack trace information printed by #printStackTrace().

GetSuppressed()

Returns an array containing all of the exceptions that were suppressed, typically by the try-with-resources statement, in order to deliver this exception.

InitCause(Throwable)

Initializes the cause of this throwable to the specified value.

PrintStackTrace()

Prints this throwable and its backtrace to the standard error stream.

PrintStackTrace(PrintStream)

Prints this throwable and its backtrace to the standard error stream.

PrintStackTrace(PrintWriter)

Prints this throwable and its backtrace to the standard error stream.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

SetStackTrace(StackTraceElement[])

Sets the stack trace elements that will be returned by #getStackTrace() and printed by #printStackTrace() and related methods.

ToException(Throwable)
ToString()
UnregisterFromRuntime()

Explicit Interface Implementations

IJavaPeerable.Disposed()
IJavaPeerable.DisposeUnlessReferenced()
IJavaPeerable.Finalized()
IJavaPeerable.JniManagedPeerState
IJavaPeerable.SetJniIdentityHashCode(Int32)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)
IJavaPeerable.SetPeerReference(JniObjectReference)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to