Class UltiToolsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ultikits.ultitools.exceptions.UltiToolsException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CommandException, ConfigurationException, ContainerException, DataAccessException, PluginModuleException, UnexpectedRollbackException
Base exception class for all UltiTools exceptions.
All custom exceptions in UltiTools should extend this class to provide consistent error handling with error codes.
- Since:
- 6.2.0
- Author:
- wisdomme
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUltiToolsException(ErrorCode errorCode) Creates a new exception with the given error code.protectedUltiToolsException(ErrorCode errorCode, String message) Creates a new exception with the given error code and custom message.protectedUltiToolsException(ErrorCode errorCode, String message, Throwable cause) Creates a new exception with the given error code, message, and cause.protectedUltiToolsException(ErrorCode errorCode, Throwable cause) Creates a new exception with the given error code and cause. -
Method Summary
Modifier and TypeMethodDescriptionGets the error code associated with this exception.Gets the formatted error message including the error code.toString()Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
errorCode
-
-
Constructor Details
-
UltiToolsException
Creates a new exception with the given error code.- Parameters:
errorCode- the error code
-
UltiToolsException
-
UltiToolsException
-
UltiToolsException
-
-
Method Details
-
getErrorCode
Gets the error code associated with this exception.- Returns:
- the error code
-
getFormattedMessage
Gets the formatted error message including the error code.- Returns:
- the formatted message
-
toString
-