java.lang.Object
studio.mevera.imperat.annotations.base.element.MethodThrowableResolver<E,S>
- All Implemented Interfaces:
ThrowableResolver<E,S>
public final class MethodThrowableResolver<E extends Throwable,S extends Source>
extends Object
implements ThrowableResolver<E,S>
-
Method Summary
-
Method Details
-
getExceptionType
-
resolve
Description copied from interface:ThrowableResolverResolves the given exception within the provided execution context. This method is called when an exception of typeEoccurs during command execution, allowing for custom handling such as user notification, logging, cleanup operations, or alternative command flows.Implementations should be mindful of:
- Not throwing additional exceptions unless absolutely necessary
- Providing meaningful feedback to the command source when appropriate
- Performing any necessary cleanup or state restoration
- Logging errors for debugging purposes when needed
The resolution process should be non-blocking and efficient, as it's part of the critical command execution path.
- Specified by:
resolvein interfaceThrowableResolver<E extends Throwable,S extends Source> - Parameters:
exception- the exception that occurred during command execution, nevernullcontext- the execution context containing the source, command state, and other relevant information at the time the exception occurred, nevernull- See Also:
-