Class InitializeException
Object
Throwable
Exception
AnchorCheckedException
AnchorFriendlyCheckedException
InitializeException
- All Implemented Interfaces:
Serializable,HasFriendlyErrorMessage
An exception that occurs when initializing something, and it doesn't succeed
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitializeException(String message) Creates with a message, but without a cause.InitializeException(String message, Throwable cause) Creates with message and cause.InitializeException(Throwable cause) Creates with a cause, but without a message. -
Method Summary
Modifier and TypeMethodDescriptionstatic InitializeExceptioncreateOrReuse(Throwable exception) Wraps exception in aInitializeException, unless it already its cause is aInitializeException.Methods inherited from class org.anchoranalysis.core.exception.friendly.AnchorFriendlyCheckedException
friendlyMessage, friendlyMessageHierarchy, friendlyMessageHierarchy, stackTraceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InitializeException
Creates with a message, but without a cause.- Parameters:
message- the message.
-
InitializeException
Creates with a cause, but without a message.- Parameters:
cause- the cause.
-
InitializeException
Creates with message and cause.- Parameters:
message- the message.cause- the cause.
-
-
Method Details
-
createOrReuse
Wraps exception in aInitializeException, unless it already its cause is aInitializeException.- Parameters:
exception- the existing exception to consider wrapping.- Returns:
- the exception wrapped into a newly-created
InitializeException, or the cause ofexceptionif it's already aInitializeException.
-