public interface ScriptExceptionListener
Modifier and Type | Field and Description |
---|---|
static short |
STATE_ABORTED
The state for aborted scripts.
|
static short |
STATE_ERROR
The state for scripts which encountered an error.
|
static short |
STATE_OK
The state for scripts for which the execution has performed correctly (or script which have not run yet).
|
Modifier and Type | Method and Description |
---|---|
void |
aborted(java.lang.String message)
Fired when an abort is encountered.
|
default short |
getScriptState()
Return the state of the listener since the last execution.
|
void |
notified(java.lang.String message,
char errorType,
java.lang.Throwable th)
Fired when any exception is encountered.
|
void |
notifiedFirst(ScriptRuntimeException exception,
char errorType,
java.lang.String extension)
Fired when the first exception is encountered while executing a script.
|
default void |
resetState()
Reset the state of the listener.
|
default void |
resetWrapperOnDispose(boolean reset)
Set if the associated ScriptWrapper must be resetState when disposing the listener.
|
void |
setScriptLogger(ScriptLogger logger)
Set the script logger.
|
static final short STATE_OK
static final short STATE_ABORTED
static final short STATE_ERROR
void setScriptLogger(ScriptLogger logger)
logger
- the script loggervoid aborted(java.lang.String message)
message
- the abort messagedefault void resetWrapperOnDispose(boolean reset)
reset
- true if the associated ScriptWrapper must be resetState when disposing the listenervoid notified(java.lang.String message, char errorType, java.lang.Throwable th)
message
- the messageerrorType
- the error typeth
- the ThrowableErrorType
void notifiedFirst(ScriptRuntimeException exception, char errorType, java.lang.String extension)
exception
- the ScriptExceptionerrorType
- the error typeextension
- the language extensionErrorType
default short getScriptState()
STATE_OK
by default.default void resetState()
Copyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence