public interface NlsThrowable extends NlsObject, AttributeReadUuid, AttributeReadMessage, AttributeReadMessageCode, Serializable
NlsMessage.UUID unique per exception instance automatically generated once per exception
chain.error code that should be unique per exception type.technical exceptions and exceptions intended for
end-users.copying and truncation of the exception.NlsMessage,
NlsException,
NlsRuntimeExceptionKEY_ANNOTATION, KEY_ARGUMENT, KEY_CAPACITY, KEY_CONTAINER, KEY_DEFAULT, KEY_DIRECTORY, KEY_ERROR, KEY_EXISTING, KEY_EXPECTED, KEY_FILE, KEY_FUNCTION, KEY_ID, KEY_KEY, KEY_LOCATION, KEY_MAX, KEY_MIN, KEY_MODE, KEY_NAME, KEY_OBJECT, KEY_OPERAND, KEY_OPERATION, KEY_OPTION, KEY_PATH, KEY_PROPERTY, KEY_QUERY, KEY_RESOURCE, KEY_SIZE, KEY_SOURCE, KEY_TARGET_TYPE, KEY_TITLE, KEY_TYPE, KEY_URI, KEY_USER, KEY_VALUE| Modifier and Type | Method and Description |
|---|---|
Throwable |
createCopy(ExceptionTruncation truncation)
Returns a copy of the given exception where the specified details are removed.
|
Throwable |
getCause() |
String |
getLocalizedMessage(Locale locale)
This method gets the localized message as string.
|
void |
getLocalizedMessage(Locale locale,
Appendable appendable)
This method writes the localized message to the given string buffer.
|
NlsMessage |
getNlsMessage()
This method gets the
NlsMessage describing the problem. |
StackTraceElement[] |
getStackTrace() |
boolean |
isForUser() |
boolean |
isTechnical()
Determines if this is a technical exception.
|
void |
printStackTrace(Locale locale,
Appendable buffer)
This method prints the stack trace with localized exception message(s).
|
String |
toString() |
String |
toString(Locale locale)
Like
toString() but using the specified Locale. |
Appendable |
toString(Locale locale,
Appendable appendable)
appends the localized string representation of this exception. |
toNlsMessagegetUuidgetMessagegetCodeboolean isTechnical()
displayed to the end-user in such case. See
TechnicalErrorUserException.message is typically
intended for to end-users and has to be easy to understand.NlsRuntimeException.true if this is a technical exception, false if this is a user error.isForUser()boolean isForUser()
NlsMessage getNlsMessage()
NlsMessage describing the problem.NlsMessage.String getLocalizedMessage(Locale locale)
locale - is the Locale to translate to.getLocalizedMessage(Locale, Appendable)void getLocalizedMessage(Locale locale, Appendable appendable)
locale - is the Locale to translate to.appendable - is where to append the message to.NlsMessage.getLocalizedMessage(Locale, Appendable)void printStackTrace(Locale locale, Appendable buffer) throws IllegalStateException
locale - is the locale to translate to.buffer - is where to write the stack trace to.IllegalStateException - if the given buffer produced an IOException.StackTraceElement[] getStackTrace()
stack-trace.Throwable createCopy(ExceptionTruncation truncation)
ExceptionUtil for
advanced usage and further details. truncation - the ExceptionTruncation to configure what to remove. E.g.
ExceptionTruncation.REMOVE_ALL.exception.String toString()
toString in class ObjecttoString(Locale)String toString(Locale locale)
toString() but using the specified Locale.locale - is the Locale used for getLocalizedMessage(Locale).toString(Locale, Appendable)
.Appendable toString(Locale locale, Appendable appendable)
appends the localized string representation of this exception. It is
defined as following:
<classname>: [<custom-code>: ]<message>
locale - is the Locale used for getLocalizedMessage(Locale).appendable - is the buffer to append to. Will be created as
StringBuilder if null is provided.Appendable or the created one if null was given.Copyright © 2001–2016 mmm-Team. All rights reserved.