Class ScriptAbuseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
delight.nashornsandbox.exceptions.ScriptAbuseException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ScriptCPUAbuseException, ScriptMemoryAbuseException

public class ScriptAbuseException extends RuntimeException
Exception is thrown when JS script abuse was detected.

Created on 2017.11.24

Version:
$Id$
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • scriptKilled

      private final boolean scriptKilled
  • Constructor Details

    • ScriptAbuseException

      public ScriptAbuseException(String message, boolean scriptKilled, Throwable throwable)
  • Method Details

    • isScriptKilled

      public boolean isScriptKilled()
      Check if script when asked exited nicely, or not.

      Note, killint java thread is very dangerous to VM health.

      Returns:
      true when evaluator thread was finished by Thread.stop() method, false when only Thread.interrupt() was used
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable