Scriptify wraps script and integration failures in typed exceptions.
ScriptExceptionBase checked exception for script failures.
| Exception | Meaning |
|---|---|
ScriptFunctionException |
Function invocation failed. |
ScriptFunctionArgumentCountMismatchException |
Script called a function with too few or too many arguments. |
ScriptFunctionArgumentTypeMismatchException |
A script argument could not be assigned to the Java executor parameter type. |
Function executor failures are wrapped in ScriptFunctionException.
| Exception | Meaning |
|---|---|
ScriptModuleLoadException |
External module source could not be loaded. |
ScriptModuleCopyException |
Copying module exports encountered a conflicting export. |
ScriptModuleWrongContextException |
A module export resolver received an incompatible runtime context. |
Runtime implementations catch engine-specific errors and usually wrap them in ScriptException.
Example:
try {
script.evalOneShot(source);
} catch (ScriptException e) {
throw new RuntimeException("Script failed", e);
}Path access may throw SecurityException when securityMode is enabled and a path is not allowed.
Security exceptions can be wrapped by runtime code if they occur during script evaluation.