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()

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