@MustImplementEqualsAndHashcode public interface IError extends IHasErrorLevelComparable<IError>, IHasErrorID, IHasErrorField
| Modifier and Type | Method and Description |
|---|---|
default String |
getAsString(Locale aContentLocale)
Get the error as a string representation, including error ID, error
location, error text and the linked exception.
|
default String |
getErrorFieldName() |
default String |
getErrorID() |
default ILocation |
getErrorLocation() |
default String |
getErrorText(Locale aContentLocale)
Get the error message of this error.
|
default IHasErrorText |
getErrorTexts() |
default Throwable |
getLinkedException() |
default Throwable |
getLinkedExceptionCause() |
default String |
getLinkedExceptionMessage() |
default StackTraceElement[] |
getLinkedExceptionStackTrace() |
default boolean |
hasErrorLocation()
Check if a reasonable error location is present.
|
default boolean |
hasLinkedException() |
compareTo, isEQ, isGE, isGT, isLE, isLT, isNEgetErrorLevel, hasErrorLevel, isError, isFailure, isNoError, isSuccessand, orthisAsTgetComparatorErrorID, hasErrorID, hasErrorID, hasNoErrorIDgetComparatorErrorFieldName, hasErrorFieldName, hasErrorFieldName, hasNoErrorFieldNamedefault String getErrorID()
getErrorID in interface IHasErrorIDnull.@Nullable default String getErrorFieldName()
getErrorFieldName in interface IHasErrorFieldnull.@Nonnull default ILocation getErrorLocation()
null location of the error. Use
SimpleLocation.NO_LOCATION to indicate no location is
available.hasErrorLocation()default boolean hasErrorLocation()
true if location information is present,
false otherwise.getErrorLocation()@Nullable default IHasErrorText getErrorTexts()
null.getErrorText(Locale)@Nullable default String getErrorText(@Nonnull Locale aContentLocale)
aContentLocale - The locale to be used in case the error text is available in
multiple languages.null in case no
error text is available or if the passed Locale is not supported.getErrorTexts()@Nullable default Throwable getLinkedException()
null if no such exception is
available.hasLinkedException(),
getLinkedExceptionMessage(),
getLinkedExceptionStackTrace(),
getLinkedExceptionCause()default boolean hasLinkedException()
true if a linked exception is present,
false if not.getLinkedException()@Nullable default String getLinkedExceptionMessage()
null if no such
exception is available.getLinkedException()@Nullable default StackTraceElement[] getLinkedExceptionStackTrace()
null if no
such exception is available.getLinkedException()@Nullable default Throwable getLinkedExceptionCause()
null if no such
exception is available.getLinkedException()@Nonnull @Nonempty default String getAsString(@Nonnull Locale aContentLocale)
aContentLocale - Locale to resolve the error textCopyright © 2014–2022 Philip Helger. All rights reserved.