Package com.blackrook.rookscript
Class ScriptValue.ErrorType
java.lang.Object
com.blackrook.rookscript.ScriptValue.ErrorType
- Enclosing class:
- ScriptValue
The class used as an error type.
Errors are a completely separate type, in order to differentiate them from objects,
and check them in return from host functions (or other functions).
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScriptValue.ErrorType
Creates an error value.static ScriptValue.ErrorType
Creates an error value.static ScriptValue.ErrorType
Creates an error value from a Throwable.getType()
toString()
-
Method Details
-
create
Creates an error value.- Parameters:
type
- the error type.message
- the error message.- Returns:
- a new ErrorType.
-
create
Creates an error value.- Parameters:
type
- the error type.message
- the error message.localizedMessage
- a localized version of the error message.- Returns:
- a new ErrorType.
-
create
Creates an error value from a Throwable. Copies the simple class name, the message, and the localized message.- Parameters:
t
- the Throwable to use.- Returns:
- a new ErrorType.
- See Also:
-
getType
-
getMessage
-
getLocalizedMessage
-
toString
-