Package io.karatelabs.js
Class EngineInterruptedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.karatelabs.js.EngineException
io.karatelabs.js.EngineInterruptedException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EngineTimeoutException
Thrown when the executing thread's interrupt flag is observed at a loop
back-edge. Lets hosts terminate long-running JS via
Thread.interrupt() or Future.cancel(boolean)
with mayInterruptIfRunning=true. Extends EngineException
so existing catch (EngineException) sites continue to handle it.
JS try/catch cannot swallow this — Interpreter.evalTryStmt(io.karatelabs.parser.Node, io.karatelabs.js.CoreContext)
special-cases it and re-throws. We intentionally do not mark this
as FlowControlSignal because karate-core callers
(Markup, ServerRequestCycle) treat FlowControlSignal
as "intentional redirect/switch — response state already set, return
normally," which would mask a host-initiated cancel as a successful run.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.karatelabs.js.EngineException
getJsErrorName, getJsMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EngineInterruptedException
public EngineInterruptedException() -
EngineInterruptedException
-