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

public abstract class ScriptException extends Exception
Abstract class for exceptions thrown by the script engine.
Author:
Kai Kreuzer - Initial contribution
See Also:
  • Constructor Details

    • ScriptException

      protected ScriptException(String message)
    • ScriptException

      protected ScriptException(ScriptError scriptError)
    • ScriptException

      protected ScriptException(String message, String scriptText, Throwable cause)
      Parameters:
      message -
      cause -
    • ScriptException

      protected ScriptException(String message, String scriptText)
    • ScriptException

      public ScriptException(String message, String scriptText, int line, int column, int length)
    • ScriptException

      public ScriptException(Throwable cause, String message, String scriptText, int line, int column, int length)
    • ScriptException

      public ScriptException(String message, Throwable cause)
  • Method Details

    • getErrors

      public List<ScriptError> getErrors()
      All Errors that lead to this Exception.
      Returns:
      List of Error. Size >= 1, there is at last one ScriptError.
    • setScriptText

      public void setScriptText(String scriptText)
    • getMessage

      public String 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 class Throwable
      Returns:
      The Message.
      See Also: