ForeignException, unmarshalled, and re-thrown.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final ForeignException. | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| private static volatile JNICalls | |
| private final byte | |
| private static final ForeignException | MARSHALLING_FAILED
Pre-allocated |
| private static final ThreadLocal | |
| private final byte[] | |
| private static final ForeignException. | |
| pack-priv static final byte |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static JNI. | |
| private static JNI. | |
| private static void | |
| pack-priv static ForeignException | |
| private static JNICalls | |
| public static ForeignException | forThrowable(Throwable
the exception that should be passed over the boundary exception, BinaryMarshaller<? super Throwable> the marshaller to marshall the exception marshaller)Creates a |
| public static JNICalls | getJNICalls()
Returns the |
| public static StackTraceElement[] | Returns: the stack trace combining both local and foreign stack trace elementsthe stack trace marshalled into the foreignExceptionStack)ForeignExceptionMerges foreign stack trace marshalled in the |
| private static <T extends Throwable> T | |
| public RuntimeException | throwOriginalException(BinaryMarshaller<? extends Throwable>
the marshaller to unmarshal the exception marshaller)Unmarshalls the foreign exception transferred by this |
| public void | |
| pack-priv byte[] |
| CreateForeignException | back to summary |
|---|---|
| private static final ForeignException. | |
| GUEST_TO_HOST | back to summary |
|---|---|
| pack-priv static final byte GUEST_TO_HOST | |
| HOST_TO_GUEST | back to summary |
|---|---|
| pack-priv static final byte HOST_TO_GUEST | |
| jniCalls | back to summary |
|---|---|
| private static volatile JNICalls jniCalls | |
| kind | back to summary |
|---|---|
| private final byte kind | |
| MARSHALLING_FAILED | back to summary |
|---|---|
| private static final ForeignException MARSHALLING_FAILED Pre-allocated | |
| pendingException | back to summary |
|---|---|
| private static final ThreadLocal<ForeignException> pendingException | |
| rawData | back to summary |
|---|---|
| private final byte[] rawData | |
| ToByteArray | back to summary |
|---|---|
| private static final ForeignException. | |
| UNDEFINED | back to summary |
|---|---|
| pack-priv static final byte UNDEFINED | |
| ForeignException | back to summary |
|---|---|
| private ForeignException(byte[] rawData, byte kind, boolean writableStackTrace) | |
| callCreateForeignException | back to summary |
|---|---|
| private static JNI. | |
| callToByteArray | back to summary |
|---|---|
| private static JNI. | |
| clearPendingException | back to summary |
|---|---|
| private static void clearPendingException() | |
| create | back to summary |
|---|---|
| pack-priv static ForeignException create(byte[] rawData, byte kind) | |
| createJNICalls | back to summary |
|---|---|
| private static JNICalls createJNICalls() | |
| forThrowable | back to summary |
|---|---|
| public static ForeignException forThrowable(Throwable exception, BinaryMarshaller<? super Throwable> marshaller) Creates a
| |
| getJNICalls | back to summary |
|---|---|
| public static JNICalls getJNICalls() Returns the | |
| mergeStackTrace | back to summary |
|---|---|
| public static StackTraceElement[] mergeStackTrace(StackTraceElement[] foreignExceptionStack) Merges foreign stack trace marshalled in the
final class DefaultThrowableMarshaller implements BinaryMarshaller<Throwable> {
private final BinaryMarshaller<StackTraceElement[]> stackTraceMarshaller = MyJNIConfig.getDefault().lookupMarshaller(StackTraceElement[].class);
@Override
public Throwable read(BinaryInput in) {
String foreignExceptionClassName = in.readUTF();
String foreignExceptionMessage = in.readUTF();
StackTraceElement[] foreignExceptionStack = stackTraceMarshaller.read(in);
RuntimeException exception = new RuntimeException(foreignExceptionClassName + ": " + foreignExceptionMessage);
exception.setStackTrace(ForeignException.mergeStackTrace(foreignExceptionStack));
return exception;
}
@Override
public void write(BinaryOutput out, Throwable object) {
out.writeUTF(object.getClass().getName());
out.writeUTF(object.getMessage());
stackTraceMarshaller.write(out, object.getStackTrace());
}
}
| |
| silenceException | back to summary |
|---|---|
private static <T extends Throwable> T silenceException(Class<T> type, Throwable t) throws Throwable-:T
| |
| throwOriginalException | back to summary |
|---|---|
| public RuntimeException throwOriginalException(BinaryMarshaller<? extends Throwable> marshaller) Unmarshalls the foreign exception transferred by this
| |
| throwUsingJNI | back to summary |
|---|---|
| public void throwUsingJNI(JNI. Re-throws this exception in host using a JNI API. This method is intended to be called by the code generated by the bridge processor. It's still possible to use it by the hand-written code, but it's recommended to use the bridge processor. | |
| toByteArray | back to summary |
|---|---|
| pack-priv byte[] toByteArray() | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile JNI. | |
| private volatile JNI. | |
| private final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | getDisplayName()
Implements org. Returns a method display name used for logging. |
| pack-priv JNI. | |
| public JNI. | getJMethodID()
Implements org. Returns a method JNI |
| pack-priv ForeignException. |
| entryPointsClass | back to summary |
|---|---|
| private volatile JNI. | |
| methodId | back to summary |
|---|---|
| private volatile JNI. | |
| methodName | back to summary |
|---|---|
| private final String methodName | |
| methodSignature | back to summary |
|---|---|
| private final String methodSignature | |
| JNIMethodResolver | back to summary |
|---|---|
| pack-priv JNIMethodResolver(String methodName, String methodSignature) | |
| getDisplayName | back to summary |
|---|---|
| public String getDisplayName() Implements org. Doc from org. Returns a method display name used for logging.
| |
| getEntryPoints | back to summary |
|---|---|
| pack-priv JNI. | |
| getJMethodID | back to summary |
|---|---|
| public JNI. Implements org. Doc from org. Returns a method JNI
| |
| resolve | back to summary |
|---|---|
| pack-priv ForeignException. | |