Class ScriptRevokedException
- All Implemented Interfaces:
Serializable
Java has no way to kill a thread, so a script that refuses to leave
onLoop cannot be terminated. What the runtime can do is cut it off:
once a runner reaches Liveness.REVOKED, every RPC attempted from its
thread (or from a thread it spawned, such as the walk executor) throws this
instead of reaching the game. A script that ignored the stop therefore stops
having any effect, even though it is still running.
In practice this usually ends the script for real: stuck scripts are
typically looping on an API call rather than spinning in pure computation, so
the exception unwinds them out of onLoop.
Scripts must not catch this. Swallowing it in a
catch (Exception) inside a retry loop turns a recoverable zombie into
an abandoned one. If you need cleanup on stop, use onStop, or poll
ScriptContext.isStopRequested() and return
from onLoop yourself.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ScriptRevokedException
-
-
Method Details
-
scriptName
The script whose access was withdrawn.
-