Package net.storm.api.plugins.exception
Class PluginStoppedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.storm.api.plugins.exception.PluginStoppedException
- All Implemented Interfaces:
Serializable
Runtime exception thrown when an operation is attempted on a stopped plugin.
PluginStoppedException indicates that the plugin has been stopped and can no longer perform the requested operation. This is typically thrown during looped plugin execution when the plugin is stopped externally.
As a RuntimeException, this does not need to be explicitly caught, but plugins may choose to handle it for graceful shutdown:
@Override
public int loop() {
try {
performAction();
} catch (PluginStoppedException e) {
// Plugin was stopped during execution
cleanup();
throw e; // Re-throw to signal loop termination
}
return 1000;
}
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new exception with no message.PluginStoppedException(String message) Creates a new exception with the specified message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PluginStoppedException
public PluginStoppedException()Creates a new exception with no message. -
PluginStoppedException
Creates a new exception with the specified message.- Parameters:
message- the detail message
-