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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
scriptBody
The actual script (its content) that caused this exception.protected String
scriptName
The name of the script that caused this exception.protected String
scriptType
The type of the script that caused this exception.
-
Constructor Summary
Constructors Modifier Constructor Description ScriptException(Script script, String message)
Creates a new script exception for the designated script declaration and the designated additional message.ScriptException(Script script, String message, Throwable cause)
Creates a new script exception for the designated script declaration, the designated additional message and the cause.protected
ScriptException(String scriptType, String scriptBody)
Creates a new script exception for the designated script.protected
ScriptException(String scriptType, String scriptBody, String message)
Creates a new script exception for the designated script and the designated additional message.protected
ScriptException(String scriptType, String scriptName, String scriptBody, String message)
Creates a new script exception for the designated script with the designated name.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.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.protected
ScriptException(String scriptType, String scriptBody, Throwable cause)
Creates a new script exception for the designated script and the cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getScriptBody()
Gets the actual script (its content) that caused this exception.String
getScriptName()
Gets the name of the script that caused this exception.String
getScriptType()
Gets the type of the script that caused this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
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 benull
-
scriptBody
protected final String scriptBody
The actual script (its content) that caused this exception.
-
-
Constructor Detail
-
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 declarationmessage
- 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 declarationmessage
- The message describing the problem leading to this exception.cause
- The cause for this exception.
-
-
Method Detail
-
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 isnull
, 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.
-
-