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
Exception is thrown when JS script abuse was detected.
Created on 2017.11.24
- Version:
- $Id$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionScriptAbuseException(String message, boolean scriptKilled, Throwable throwable) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if script when asked exited nicely, or not.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
scriptKilled
private final boolean scriptKilled
-
-
Constructor Details
-
ScriptAbuseException
-
-
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:
truewhen evaluator thread was finished byThread.stop()method,falsewhen onlyThread.interrupt()was used
-
getMessage
- Overrides:
getMessagein classThrowable
-