S
- the script interfacepublic interface ScriptException<S>
Modifier and Type | Field and Description |
---|---|
static short |
COMPILATION_EXCEPTION
Compilation exceptions.
|
static short |
RUNTIME_EXCEPTION
Runtime exceptions.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getCallerThrowable()
Return the throwable whch have been created from the caller script.
|
short |
getExceptionType()
Return the exception type.
|
java.io.File |
getFile()
Return the script file.
|
java.lang.String |
getFilename()
Return the script filename.
|
int |
getLineNumber()
Return the exception line number.
|
int |
getLineNumber(ScriptSource source,
int lineNumber)
Return the effective line number of a line detected in the script runtime.
|
java.lang.String |
getMessage()
Return the exception message.
|
ScriptWrapper<S> |
getScript()
Return the script wrapper.
|
ScriptSource |
getSource()
Return the script source.
|
java.util.List<java.lang.StackTraceElement> |
getStackTrace(boolean filterScriptExceptions)
Return the StackTrace.
|
java.lang.Throwable |
getThrowable()
Return the wrapped Java exception.
|
boolean |
isScriptException(java.lang.StackTraceElement st)
Return true if a StackTraceElement is a script exception.
|
void |
setFile(java.io.File file)
Set the exception file.
|
void |
setScript(ScriptWrapper<S> script)
Set the script wrapper.
|
void |
setupExceptionOrigin()
Setup the exception origin.
|
static final short COMPILATION_EXCEPTION
static final short RUNTIME_EXCEPTION
void setupExceptionOrigin()
getFile()
getFilename()
getLineNumber()
short getExceptionType()
RUNTIME_EXCEPTION
or COMPILATION_EXCEPTION
.void setScript(ScriptWrapper<S> script)
script
- the script wrapperScriptWrapper<S> getScript()
ScriptSource getSource()
java.lang.String getFilename()
boolean isScriptException(java.lang.StackTraceElement st)
st
- the StackTraceElementjava.io.File getFile()
void setFile(java.io.File file)
file
- the filejava.lang.Throwable getCallerThrowable()
int getLineNumber(ScriptSource source, int lineNumber)
source
- the script sourcelineNumber
- the line numberint getLineNumber()
java.lang.String getMessage()
java.lang.Throwable getThrowable()
java.util.List<java.lang.StackTraceElement> getStackTrace(boolean filterScriptExceptions)
filterScriptExceptions
- filter the script exceptions, if true only those exceptions will be added in the
StackTraceCopyright © 2019-2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence