public class EcmSimpleException extends EcmException
EcmSimpleExceptions have a collection of EcmMessagePart-objects, i.e., messages that COULD be localized (if said so).EcmMessagePart) could be
(if should be) localized and (then) concatened into a human-readable message.EcmMessagePart in the list ALWAYS is a exception's class name.EcmMessagePart,
Serialized Form| Constructor and Description |
|---|
EcmSimpleException()
Constructor that initializes list of exception's messages (which means setting exception's class name as the first part of a message).
|
EcmSimpleException(java.util.Collection<EcmMessagePart> messages)
Creates an exception with following submessages :
- exception's class simple name - all the EcmMessagePart-objects transfered as a parameter |
EcmSimpleException(EcmMessagePart... messages)
Creates an exception with following submessages :
- exception's class simple name - all the EcmMessagePart-objects transfered as a parameter |
EcmSimpleException(java.lang.Exception e)
Creates an exception with following submessages :
- (potentionally localized) exception's class simple name - unlocalized exception's message |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessages(EcmMessagePart... messageParts)
Adds a collection of
EcmMessagePart-objects |
void |
addMessages(java.lang.String... messageParts)
Adds a collection of
EcmMessagePart-objects |
void |
clearMessages()
Clears a collection of submessages, then installs exception's class name as the first
EcmMessagePart. |
EcmMessage |
getMessages() |
void |
setMessages(EcmMessagePart... messageParts)
Sets a collection of
EcmMessagePart-objects |
void |
setMessages(java.lang.String... messageParts)
Sets a collection of
EcmMessagePart-objects |
java.lang.String |
toString() |
java.lang.String |
toString(java.util.Locale locale) |
java.lang.String |
toUnlocalizedString() |
public EcmSimpleException()
public EcmSimpleException(EcmMessagePart... messages)
EcmMessagePart-objects transfered as a parametermessages - Collection of EcmMessagePart-objects that should be concatenated after an exception's class simple nameEcmMessagePartpublic EcmSimpleException(java.util.Collection<EcmMessagePart> messages)
EcmMessagePart-objects transfered as a parametermessages - Collection of EcmMessagePart-objects that should be concatenated after an exception's class simple nameEcmMessagePartpublic EcmSimpleException(java.lang.Exception e)
e - An exception whose message we will inject into newly created EcmExceptionpublic void clearMessages()
EcmMessagePart.public void setMessages(EcmMessagePart... messageParts)
EcmMessagePart-objectsmessageParts - Parts of a messageEcmMessagePartpublic void setMessages(java.lang.String... messageParts)
EcmMessagePart-objectsmessageParts - Parts of a messagepublic void addMessages(EcmMessagePart... messageParts)
EcmMessagePart-objectsmessageParts - Parts of a messageEcmMessagePartpublic void addMessages(java.lang.String... messageParts)
EcmMessagePart-objectsmessageParts - Parts of a messageEcmMessagePartpublic EcmMessage getMessages()
public java.lang.String toUnlocalizedString()
public java.lang.String toString(java.util.Locale locale)
public java.lang.String toString()
toString in class java.lang.Throwable