Class EngineInterruptedException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EngineTimeoutException

public class EngineInterruptedException extends EngineException
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 Details

    • EngineInterruptedException

      public EngineInterruptedException()
    • EngineInterruptedException

      protected EngineInterruptedException(String message)