Class ScriptExceptionEvent
java.lang.Object
net.md_5.bungee.api.plugin.Event
dev.magicmq.pyspigot.bungee.event.ScriptEvent
dev.magicmq.pyspigot.bungee.event.ScriptExceptionEvent
Called when a script throws an unhandled error/exception.
The exception will be a PyException, which will include Java exceptions thrown by calls to Java code from scripts. Use Throwable.getCause() to determine if there was an underlying Java exception.
-
Constructor Summary
ConstructorsConstructorDescriptionScriptExceptionEvent(dev.magicmq.pyspigot.manager.script.Script script, PyException exception) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet if the exception should be reported to console and/or a script's log file.Get thePyExceptionthat was thrown.voidsetReportException(boolean reportException) Set if the exception should be reported to console and/or the script's log file.Methods inherited from class dev.magicmq.pyspigot.bungee.event.ScriptEvent
getScriptMethods inherited from class net.md_5.bungee.api.plugin.Event
postCall
-
Constructor Details
-
ScriptExceptionEvent
public ScriptExceptionEvent(dev.magicmq.pyspigot.manager.script.Script script, PyException exception) - Parameters:
script- The script that caused the error/exceptionexception- ThePyExceptionthat was thrown
-
-
Method Details
-
getException
Get thePyExceptionthat was thrown.- Returns:
- The
PyExceptionthat was thrown
-
doReportException
public boolean doReportException()Get if the exception should be reported to console and/or a script's log file.- Returns:
- True if the exception should be reported to console and/or a script's log file, false if otherwise
-
setReportException
public void setReportException(boolean reportException) Set if the exception should be reported to console and/or the script's log file.- Parameters:
reportException- Whether the exception should be reported.
-