Class PluginModuleException

All Implemented Interfaces:
Serializable

public class PluginModuleException extends UltiToolsException
Exception thrown when plugin module operations fail.
Since:
6.2.0
Author:
wisdomme
See Also:
  • Constructor Details

    • PluginModuleException

      public PluginModuleException(String message)
      Creates a new plugin module exception with the given message.
      Parameters:
      message - the error message
    • PluginModuleException

      public PluginModuleException(ErrorCode errorCode, String message)
      Creates a new plugin module exception with a specific error code.
      Parameters:
      errorCode - the error code
      message - the error message
    • PluginModuleException

      public PluginModuleException(String message, Throwable cause)
      Creates a new plugin module exception with message and cause.
      Parameters:
      message - the error message
      cause - the underlying cause
    • PluginModuleException

      public PluginModuleException(ErrorCode errorCode, String message, Throwable cause)
      Creates a new plugin module exception with error code, message, and cause.
      Parameters:
      errorCode - the error code
      message - the error message
      cause - the underlying cause
  • Method Details

    • loadFailed

      public static PluginModuleException loadFailed(String pluginName, Throwable cause)
      Creates an exception for plugin load failures.
      Parameters:
      pluginName - the name of the plugin that failed to load
      cause - the underlying cause
      Returns:
      a new PluginModuleException
    • unloadFailed

      public static PluginModuleException unloadFailed(String pluginName, Throwable cause)
      Creates an exception for plugin unload failures.
      Parameters:
      pluginName - the name of the plugin that failed to unload
      cause - the underlying cause
      Returns:
      a new PluginModuleException
    • dependencyMissing

      public static PluginModuleException dependencyMissing(String pluginName, String missingDependency)
      Creates an exception for missing plugin dependencies.
      Parameters:
      pluginName - the name of the plugin with missing dependencies
      missingDependency - the name of the missing dependency
      Returns:
      a new PluginModuleException
    • circularDependency

      public static PluginModuleException circularDependency(String... pluginNames)
      Creates an exception for circular plugin dependencies.
      Parameters:
      pluginNames - the names of plugins involved in the circular dependency
      Returns:
      a new PluginModuleException
    • responderTypeOwnedByFramework

      public static PluginModuleException responderTypeOwnedByFramework(String messageType)
      Creates an exception refusing to register a responder for a message type the framework itself already owns (D-26). Single-owner semantics apply to the framework's own 24 message types exactly as they do to another module's — without this check, a module could silently take over execute_command.
      Parameters:
      messageType - the message type the framework already serves
      Returns:
      a new PluginModuleException
    • responderTypeAlreadyOwned

      public static PluginModuleException responderTypeAlreadyOwned(String messageType, String existingOwner)
      Creates an exception refusing to register a responder for a message type another module has already claimed (D-26). Names both the contested type and the incumbent owner, so the offending module author can act on it without cross-referencing anything else.
      Parameters:
      messageType - the contested message type
      existingOwner - the module that already owns messageType
      Returns:
      a new PluginModuleException
    • responderTimedOut

      public static PluginModuleException responderTimedOut(String messageType, String ownerModule, long elapsedMillis)
      Creates an exception for a responder whose future did not complete within the registry's single, one-place timeout (D-27). Used both to complete the caller's future exceptionally and to name the failure in the outbound error reply sent back to the panel.
      Parameters:
      messageType - the message type whose responder timed out
      ownerModule - the module that owns the timed-out responder
      elapsedMillis - how long the registry waited before giving up
      Returns:
      a new PluginModuleException