Table of Contents

Class JVMBridgeException<TException>

Namespace
MASES.JCOBridge.C2JBridge
Assembly
C2JBridge.dll

Java Exception class extending JVMBridgeException

public abstract class JVMBridgeException<TException> : JVMBridgeException, ISerializable, _Exception, IJVMBridgeCore where TException : JVMBridgeException

Type Parameters

TException

An 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

message string

The 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

message string

The error message that explains the reason for the exception.

innerException Exception

The 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

jException JavaException

The 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

args object[]

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

signature string

The JNI constructor signature to be used

args object[]

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

args object[]

The arguments of constructor