public class JCNativeException extends JCException
When a CLR method invoked via JCOBridge throws a .NET exception, the bridge
catches it, serializes the exception type and message into a structured string of
the form "CLRExceptionFromJVM [FullyQualifiedTypeName] message...", and
re-throws it as a JCNativeException. The CLR exception type is extracted
from this string by checkForCLRException(java.lang.String) and stored in _clrType.
The original CLR exception object may also be available via getCLRException()
as a JCObject, allowing further inspection of the CLR exception properties
from the JVM side.
See also: JCOReflector for usage examples.
| Modifier and Type | Method and Description |
|---|---|
JCObject |
getCLRException()
Returns the CLR exception object wrapped as a
JCObject, allowing further
inspection of CLR exception properties (e.g. |
String |
getCLRType()
Returns the fully qualified CLR exception type name, or
null if this
exception did not originate from the CLR side. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic String getCLRType()
null if this
exception did not originate from the CLR side."System.InvalidOperationException",
or null.public JCObject getCLRException()
JCObject, allowing further
inspection of CLR exception properties (e.g. InnerException, StackTrace)
from the JVM side. Returns null if the CLR exception object was not attached.JCObject, or null.