Class ScriptException

java.lang.Object
java.lang.Throwable
java.lang.Exception
de.aristaflow.adept2.model.scripts.ScriptException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ScriptEnvironmentException, ScriptEvaluationException

public class ScriptException extends Exception
An exception indicating that there is a problem with a script.
Author:
Ulrich Kreher
See Also:
  • Field Details

    • scriptType

      protected final String scriptType
      The type of the script that caused this exception.
    • scriptName

      protected final String scriptName
      The name of the script that caused this exception. This may be null
    • scriptBody

      protected final String scriptBody
      The actual script (its content) that caused this exception.
  • Constructor Details

    • ScriptException

      protected ScriptException(String scriptType, String scriptBody)
      Creates a new script exception for the designated script.
      Parameters:
      scriptType - The type of the script that caused this exception.
      scriptBody - The name of the script that caused this exception.
    • ScriptException

      protected ScriptException(String scriptType, String scriptBody, String message)
      Creates a new script exception for the designated script and the designated additional message.
      Parameters:
      scriptType - The type of the script that caused this exception.
      scriptBody - The name of the script that caused this exception.
      message - The message describing the problem leading to this exception.
    • ScriptException

      protected ScriptException(String scriptType, String scriptName, String scriptBody, String message)
      Creates a new script exception for the designated script with the designated name.
      Parameters:
      scriptType - The type of the script that caused this exception.
      scriptName - The name of the script that caused this exception.
      scriptBody - The actual script (its content) that caused this exception.
      message - The message describing the problem leading to this exception.
    • ScriptException

      protected ScriptException(String scriptType, String scriptBody, Throwable cause)
      Creates a new script exception for the designated script and the cause.
      Parameters:
      scriptType - The type of the script that caused this exception.
      scriptBody - The name of the script that caused this exception.
      cause - The cause for this exception.
    • ScriptException

      protected ScriptException(String scriptType, String scriptBody, String message, Throwable cause)
      Creates a new script exception for the designated script, the designated additional message and the cause.
      Parameters:
      scriptType - The type of the script that caused this exception.
      scriptBody - The name of the script that caused this exception.
      message - The message describing the problem leading to this exception.
      cause - The cause for this exception.
    • ScriptException

      protected ScriptException(String scriptType, String scriptName, String scriptBody, String message, Throwable cause)
      Creates a new script exception for the designated script with the designated name, the designated additional message and the cause.
      Parameters:
      scriptType - The type of the script that caused this exception.
      scriptName - The name of the script that caused this exception.
      scriptBody - The actual script (its content) that caused this exception.
      message - The message describing the problem leading to this exception.
      cause - The cause for this exception.
    • ScriptException

      public ScriptException(Script script, String message)
      Creates a new script exception for the designated script declaration and the designated additional message.
      Parameters:
      script - the script declaration
      message - The message describing the problem leading to this exception.
    • ScriptException

      public ScriptException(Script script, String message, Throwable cause)
      Creates a new script exception for the designated script declaration, the designated additional message and the cause.
      Parameters:
      script - the script declaration
      message - The message describing the problem leading to this exception.
      cause - The cause for this exception.
  • Method Details

    • getScriptType

      public String getScriptType()
      Gets the type of the script that caused this exception.
      Returns:
      The type of the script that caused this exception.
    • getScriptName

      public String getScriptName()
      Gets the name of the script that caused this exception. If this is null, refer to the content.
      Returns:
      The name of the script that caused this exception.
    • getScriptBody

      public String getScriptBody()
      Gets the actual script (its content) that caused this exception.
      Returns:
      The actual script (its content) that caused this exception.