Class PluginModuleException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ultikits.ultitools.exceptions.UltiToolsException
com.ultikits.ultitools.exceptions.PluginModuleException
- All Implemented Interfaces:
Serializable
Exception thrown when plugin module operations fail.
- Since:
- 6.2.0
- Author:
- wisdomme
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPluginModuleException(ErrorCode errorCode, String message) Creates a new plugin module exception with a specific error code.PluginModuleException(ErrorCode errorCode, String message, Throwable cause) Creates a new plugin module exception with error code, message, and cause.PluginModuleException(String message) Creates a new plugin module exception with the given message.PluginModuleException(String message, Throwable cause) Creates a new plugin module exception with message and cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic PluginModuleExceptioncircularDependency(String... pluginNames) Creates an exception for circular plugin dependencies.static PluginModuleExceptiondependencyMissing(String pluginName, String missingDependency) Creates an exception for missing plugin dependencies.static PluginModuleExceptionloadFailed(String pluginName, Throwable cause) Creates an exception for plugin load failures.static PluginModuleExceptionresponderTimedOut(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).static PluginModuleExceptionresponderTypeAlreadyOwned(String messageType, String existingOwner) Creates an exception refusing to register a responder for a message type another module has already claimed (D-26).static PluginModuleExceptionresponderTypeOwnedByFramework(String messageType) Creates an exception refusing to register a responder for a message type the framework itself already owns (D-26).static PluginModuleExceptionunloadFailed(String pluginName, Throwable cause) Creates an exception for plugin unload failures.Methods inherited from class com.ultikits.ultitools.exceptions.UltiToolsException
getErrorCode, getFormattedMessage, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
PluginModuleException
Creates a new plugin module exception with the given message.- Parameters:
message- the error message
-
PluginModuleException
Creates a new plugin module exception with a specific error code.- Parameters:
errorCode- the error codemessage- the error message
-
PluginModuleException
Creates a new plugin module exception with message and cause.- Parameters:
message- the error messagecause- the underlying cause
-
PluginModuleException
Creates a new plugin module exception with error code, message, and cause.- Parameters:
errorCode- the error codemessage- the error messagecause- the underlying cause
-
-
Method Details
-
loadFailed
Creates an exception for plugin load failures.- Parameters:
pluginName- the name of the plugin that failed to loadcause- the underlying cause- Returns:
- a new PluginModuleException
-
unloadFailed
Creates an exception for plugin unload failures.- Parameters:
pluginName- the name of the plugin that failed to unloadcause- the underlying cause- Returns:
- a new PluginModuleException
-
dependencyMissing
Creates an exception for missing plugin dependencies.- Parameters:
pluginName- the name of the plugin with missing dependenciesmissingDependency- the name of the missing dependency- Returns:
- a new PluginModuleException
-
circularDependency
Creates an exception for circular plugin dependencies.- Parameters:
pluginNames- the names of plugins involved in the circular dependency- Returns:
- a new PluginModuleException
-
responderTypeOwnedByFramework
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 overexecute_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 typeexistingOwner- the module that already ownsmessageType- 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 outownerModule- the module that owns the timed-out responderelapsedMillis- how long the registry waited before giving up- Returns:
- a new PluginModuleException
-