Class ScriptException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.openhab.core.model.script.engine.ScriptException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ScriptExecutionException
,ScriptParsingException
Abstract class for exceptions thrown by the script engine.
- Author:
- Kai Kreuzer - Initial contribution
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
ScriptException
(String message) protected
ScriptException
(String message, String scriptText) ScriptException
(String message, String scriptText, int line, int column, int length) protected
ScriptException
(String message, String scriptText, Throwable cause) ScriptException
(String message, Throwable cause) ScriptException
(Throwable cause, String message, String scriptText, int line, int column, int length) protected
ScriptException
(ScriptError scriptError) -
Method Summary
Modifier and TypeMethodDescriptionAll Errors that lead to this Exception.Returns a concatenation of all errors in contained ScriptError instances.void
setScriptText
(String scriptText) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ScriptException
-
ScriptException
-
ScriptException
- Parameters:
message
-cause
-
-
ScriptException
-
ScriptException
-
ScriptException
-
ScriptException
-
-
Method Details
-
getErrors
All Errors that lead to this Exception.- Returns:
- List of Error. Size >= 1, there is at last one ScriptError.
-
setScriptText
-
getMessage
Returns a concatenation of all errors in contained ScriptError instances. Separated by newline, except for last error; no \n if only one error.- Overrides:
getMessage
in classThrowable
- Returns:
- The Message.
- See Also:
-