Class PluginStoppedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.storm.api.plugins.exception.PluginStoppedException
All Implemented Interfaces:
Serializable

public class PluginStoppedException extends RuntimeException
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 Details

    • PluginStoppedException

      public PluginStoppedException()
      Creates a new exception with no message.
    • PluginStoppedException

      public PluginStoppedException(String message)
      Creates a new exception with the specified message.
      Parameters:
      message - the detail message