-
- All Implemented Interfaces:
-
java.io.Serializable
public final class SessionException extends RuntimeException
Thrown by SessionBridge when the underlying session crate returns an error.
The structured fields mirror the Rust
ClientErrordiscriminants — consumers can dispatch on kind (one of SessionBridge.ERROR_*) for typed handling, or read message / code for display.ABI-locked constructor signature. The Rust JNI bridge (
session/src/jni_bridge.rs) instantiates this class via reflection looking up(IILjava/lang/String;Ljava/lang/String;)V. Do not change the parameter order or types.
-
-
Constructor Summary
Constructors Constructor Description SessionException(Integer kind, Integer statusCode, String code, String message)
-
Method Summary
Modifier and Type Method Description final IntegergetKind()One of SessionBridge.ERROR_NOT_INITIALIZED etc. final IntegergetStatusCode()HTTP status when applicable ( ERROR_HTTP/ERROR_SERVER_UNAVAILABLE); 0 otherwise.final StringgetCode()Machine-readable code (e.g. ThrowablegetCause()StringgetMessage()-
Methods inherited from class java.lang.Exception
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getStatusCode
final Integer getStatusCode()
HTTP status when applicable (
ERROR_HTTP/ERROR_SERVER_UNAVAILABLE); 0 otherwise.
-
getCode
final String getCode()
Machine-readable code (e.g.
"user_unavailable") or field name (MISSING_FIELD). May be null.
-
getMessage
String getMessage()
-
-
-
-