- All Superinterfaces:
ErrorCodeAccessor
- All Known Implementing Classes:
AbstractException,AbstractHiddenException,AbstractIOException,AbstractRuntimeException,BugException,DisposedException,IntegrityException,IORuntimeException,LockedException,LockedException.LockedRuntimeException,MarshalException,TimeoutIOException,UnmarshalException,VerifyRuntimeException,VetoException,VetoException.VetoRuntimeException
Interface declaring base exception functionality for all of refcodes
exceptions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.exception.ErrorCodeAccessor
ErrorCodeAccessor.ErrorCodeBuilder<B extends ErrorCodeAccessor.ErrorCodeBuilder<B>>, ErrorCodeAccessor.ErrorCodeMutator, ErrorCodeAccessor.ErrorCodeProperty -
Method Summary
Modifier and TypeMethodDescriptiondefault StringGenerates a localized message by considering aThrowable'sThrowable.getCause()cause as well asThrowable.getSuppressed()exceptions.static StringtoLocalizedMessage(String aMessage, Exception aException) Creates a message from the provided message and theException's contained localized message(s).static StringtoLocalizedMessage(Throwable aException) Generates a localized message by considering aThrowable's causeThrowable.getCause()as well asThrowable.getSuppressed()exceptions.default StringGenerates a message by considering aThrowable's causeThrowable.getCause()as well as suppressedThrowable.getSuppressed()exceptions.static StringCreates a message from the provided message and theException's contained message(s).static StringGenerates a message by considering theThrowable's causeThrowable.getCause()as well asThrowable.getSuppressed()exceptions.default StringGenerates a short localized message by just considering aThrowable'sThrowable.getCause()root cause as well as rootThrowable.getSuppressed()exceptions only.static StringtoShortLocalizedMessage(Throwable aException) Generates a short localized message by just considering aThrowable's root causeThrowable.getCause()as well asThrowable.getSuppressed()root exceptions only.default StringGenerates a short message by just considering aThrowable's root causeThrowable.getCause()as well as rootThrowable.getSuppressed()exceptions only.static StringtoShortMessage(Throwable aException) Generates a short message by just considering theThrowable's root causeThrowable.getCause()as well asThrowable.getSuppressed()root exceptions only.Methods inherited from interface org.refcodes.exception.ErrorCodeAccessor
getErrorCode
-
Method Details
-
toMessage
Generates a message by considering aThrowable's causeThrowable.getCause()as well as suppressedThrowable.getSuppressed()exceptions.- Returns:
- The according more verbose
Exception's message.
-
toLocalizedMessage
Generates a localized message by considering aThrowable'sThrowable.getCause()cause as well asThrowable.getSuppressed()exceptions.- Returns:
- The according more verbose
Exception's message.
-
toShortMessage
Generates a short message by just considering aThrowable's root causeThrowable.getCause()as well as rootThrowable.getSuppressed()exceptions only.- Returns:
- The according more verbose shorter
Exception's message.
-
toShortLocalizedMessage
Generates a short localized message by just considering aThrowable'sThrowable.getCause()root cause as well as rootThrowable.getSuppressed()exceptions only.- Returns:
- The according more verbose shorter
Exception's message.
-
toMessage
Generates a message by considering theThrowable's causeThrowable.getCause()as well asThrowable.getSuppressed()exceptions. -
toLocalizedMessage
Generates a localized message by considering aThrowable's causeThrowable.getCause()as well asThrowable.getSuppressed()exceptions. -
toShortMessage
Generates a short message by just considering theThrowable's root causeThrowable.getCause()as well asThrowable.getSuppressed()root exceptions only. -
toShortLocalizedMessage
Generates a short localized message by just considering aThrowable's root causeThrowable.getCause()as well asThrowable.getSuppressed()root exceptions only. -
toMessage
Creates a message from the provided message and theException's contained message(s).- Parameters:
aMessage- The message for which to generate the message.aException- TheThrowablefrom which to produce the message details.- Returns:
- The resulting message.
-
toLocalizedMessage
Creates a message from the provided message and theException's contained localized message(s).- Parameters:
aMessage- The message for which to generate the message.aException- TheThrowablefrom which to produce the message details.- Returns:
- The resulting message.
-