Class EngineException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EngineInterruptedException

public class EngineException extends RuntimeException
See Also:
  • Constructor Details

    • EngineException

      public EngineException(String message, Throwable cause)
    • EngineException

      public EngineException(String message, Throwable cause, String jsErrorName)
      Parameters:
      jsErrorName - canonical JS error constructor name ("TypeError" | "ReferenceError" | "RangeError" | "SyntaxError" | "URIError" | "EvalError" | "Error" | null if non-JS origin)
    • EngineException

      public EngineException(String message, Throwable cause, String jsErrorName, String jsMessage)
      Parameters:
      jsErrorName - canonical JS error constructor name (see above)
      jsMessage - the raw JS-side .message value — what e.message inside a JS catch would observe. Distinct from Throwable.getMessage(), which carries the host-facing "js failed: / Code: / Error: ..." frame for logs. Pass null when no JS-origin message is available.
  • Method Details

    • getJsErrorName

      public String getJsErrorName()
      Returns:
      the JS error constructor name when this exception originated from an uncaught JS throw; null for Java-origin errors (the caller can still inspect Throwable.getMessage() or the cause chain).
    • getJsMessage

      public String getJsMessage()
      Returns:
      the unframed JS-side message (what e.message would be inside a JS catch), or null when the exception has no JS-origin message. Callers building a JS-facing surface should prefer this over Throwable.getMessage(), which intentionally carries host-side framing (file/line/column) for logging.