public enum ExceptionType extends Enum<ExceptionType>
InteropLibrary.isException(Object)
,
InteropLibrary.getExceptionType(Object)
Enum.EnumDesc<E extends Enum<E>>
Enum Constant and Description |
---|
EXIT
Indicates that the application was soft-exited within the guest language program.
|
INTERRUPT
Indicates that the application thread was interrupted by an
InterruptedException . |
PARSE_ERROR
Indicates a parser or syntax error.
|
RUNTIME_ERROR
Indicates a guest language error.
|
Modifier and Type | Method and Description |
---|---|
static ExceptionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExceptionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExceptionType EXIT
getExceptionExitStatus
. See
Context Exit
for further information.
If a language uses hard exits, it should not use soft exits, i.e. throw exceptions of this type on its own.
If a language that does not use soft exits sees an exception of this type, it should re-throw it like other foreign exceptions, triggering finally blocks.
InteropLibrary.getExceptionExitStatus(Object)
public static final ExceptionType INTERRUPT
InterruptedException
.public static final ExceptionType RUNTIME_ERROR
public static final ExceptionType PARSE_ERROR
parsing
of guest language source code. Use
isExceptionIncompleteSource
to
find out if the parse error happened due to incomplete source.InteropLibrary.isExceptionIncompleteSource(Object)
public static ExceptionType[] values()
public static ExceptionType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null