Package com.oracle.truffle.api.interop
Enum Class ExceptionType
- All Implemented Interfaces:
Serializable
,Comparable<ExceptionType>
,Constable
Represents a type of a Truffle exception.
- Since:
- 20.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that the application was soft-exited within the guest language program.Indicates that the application thread was interrupted by anInterruptedException
.Indicates a parser or syntax error.Indicates a guest language error. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptionType
Returns the enum constant of this class with the specified name.static ExceptionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXIT
Indicates that the application was soft-exited within the guest language program. To obtain the exit status usegetExceptionExitStatus
. 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.
- Since:
- 20.3
- See Also:
-
INTERRUPT
Indicates that the application thread was interrupted by anInterruptedException
.- Since:
- 20.3
-
RUNTIME_ERROR
Indicates a guest language error.- Since:
- 20.3
-
PARSE_ERROR
Indicates a parser or syntax error. Syntax errors typically occur whileparsing
of guest language source code. UseisExceptionIncompleteSource
to find out if the parse error happened due to incomplete source.- Since:
- 20.3
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-