Package dev.restate.sdk.common
Class TerminalException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.restate.sdk.common.TerminalException
- All Implemented Interfaces:
Serializable
When thrown in a Restate service method, it will complete the invocation with an error.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionTerminalException
(int code) LikeTerminalException(int, String)
, without message.TerminalException
(int code, String message) Create a newTerminalException
.TerminalException
(String message) LikeTerminalException(int, String)
, with codeINTERNAL_SERVER_ERROR_CODE
. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ABORTED_CODE
public static final int ABORTED_CODE- See Also:
-
CANCELLED_CODE
public static final int CANCELLED_CODE- See Also:
-
BAD_REQUEST_CODE
public static final int BAD_REQUEST_CODE- See Also:
-
INTERNAL_SERVER_ERROR_CODE
public static final int INTERNAL_SERVER_ERROR_CODE- See Also:
-
-
Constructor Details
-
TerminalException
public TerminalException() -
TerminalException
public TerminalException(int code) LikeTerminalException(int, String)
, without message. -
TerminalException
Create a newTerminalException
.- Parameters:
code
- HTTP response status codemessage
- error message
-
TerminalException
LikeTerminalException(int, String)
, with codeINTERNAL_SERVER_ERROR_CODE
.
-
-
Method Details
-
getCode
public int getCode()- Returns:
- status code
-