Class JVMBridgeException<TException>
Java Exception class extending JVMBridgeException
public abstract class JVMBridgeException<TException> : JVMBridgeException, ISerializable, _Exception, IJVMBridgeCore where TException : JVMBridgeException
Type Parameters
TExceptionAn exception class inherited from JVMBridgeException<TException>
- Inheritance
-
JVMBridgeException<TException>
- Implements
- Inherited Members
- Extension Methods
Constructors
JVMBridgeException()
Initializes a new instance of the Exception class.
public JVMBridgeException()
JVMBridgeException(string)
Initializes a new instance of the Exception class with a specified error message.
public JVMBridgeException(string message)
Parameters
messagestringThe message that describes the error.
JVMBridgeException(string, Exception)
Initializes a new instance of the Exception class with a specified error message and a reference to the inner exception that is the cause of this exception.
public JVMBridgeException(string message, Exception innerException)
Parameters
messagestringThe error message that explains the reason for the exception.
innerExceptionExceptionThe exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Methods
Convert(JavaException)
Convert a JavaException into an instance of TException
public static TException Convert(JavaException jException)
Parameters
jExceptionJavaExceptionThe JavaException to be translated
Returns
- TException
The translated
TException
Create(params object[])
Used to create instance of TException
public static TException Create(params object[] args)
Parameters
argsobject[]The arguments of constructor
Returns
- TException
A Java instance of
TException
Remarks
You cannot use throw on the returned TException to raise an exception to Java context. This is a special method to allocate an exception in Java context. It avoids reflection problems with the behavior used to report back in .NET the exceptions raised from Java methods.
CreateWithSignature(string, params object[])
Used to create instance of TException
public static TException CreateWithSignature(string signature, params object[] args)
Parameters
signaturestringThe JNI constructor signature to be used
argsobject[]The arguments of constructor
Returns
- TException
A Java instance of
TException
Remarks
You cannot use throw on the returned TException to raise an exception to Java context. This is a special method to allocate an exception in Java context. It avoids reflection problems with the behavior used to report back in .NET the exceptions raised from Java methods.
ThrowNew(params object[])
Used to throw instance of TException
public static void ThrowNew(params object[] args)
Parameters
argsobject[]The arguments of constructor