public class NativeException
extends java.lang.RuntimeException
RuntimeException
subclass that may be thrown from an SNI native using SNI_throwNativeException()
function.Constructor and Description |
---|
NativeException(int errorCode,
java.lang.String errorMessage)
Constructs a new
NativeException with the specified error code and detail message. |
NativeException(int errorCode,
java.lang.String errorMessage,
java.lang.Throwable cause)
Constructs a new
NativeException with the specified error code, detail message and cause. |
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Returns the error code of this
NativeException . |
java.lang.String |
getMessage()
Returns the detail message string of this
NativeException . |
public NativeException(int errorCode, java.lang.String errorMessage)
NativeException
with the specified error code and detail message.errorCode
- the error code. The error code is saved for later retrieval by the getErrorCode()
method.errorMessage
- the detail message. The detail message is saved for later retrieval by the getMessage()
method.public NativeException(int errorCode, java.lang.String errorMessage, @Nullable java.lang.Throwable cause)
NativeException
with the specified error code, detail message and cause.errorCode
- the error code. The error code is saved for later retrieval by the getErrorCode()
method.errorMessage
- the detail message. The detail message is saved for later retrieval by the getMessage()
method.cause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null
value is permitted, and indicates that the cause is nonexistent or unknown.)@Nullable public java.lang.String getMessage()
NativeException
.getMessage
in class java.lang.Throwable
NativeException
instance (which may be null
).public int getErrorCode()
NativeException
.NativeException
instance.