
public class IllegalTransactionException extends IllegalTransactionException
Example: Throwing an IllegalTransactionException
IllegalTransactionException e = new IllegalTransactionException(); e.addMessage(message); e.addMessage(Transaction.PROP_XYZ, message); throw e;
| Constructor and Description |
|---|
IllegalTransactionException()
Creates a new
IllegalTransactionException instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(Message message)
Adds a message to the instance.
|
void |
addMessage(String propertyName,
Message message)
Adds a message for a property to the instance.
|
void |
addMessages(Messages messages)
Adds messages to the instance.
|
void |
addMessages(String propertyName,
Messages messages)
Adds messages bound to a property to the instance.
|
Message[] |
getMessages()
Gets all messages describing the exception.
|
Message[] |
getMessages(String propertyName)
Gets messages bound to a property removing these messages from the instance.
|
String[] |
getPropertyNames()
Gets the names of all properties for which the exception holds messages.
|
String |
toString()
Returns a string representation of the object.
|
getMessageaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic IllegalTransactionException()
IllegalTransactionException instance.public void addMessage(Message message)
message - The message to add to the instance.NullPointerException - if message is null.public void addMessage(String propertyName, Message message)
propertyName - The name of a property message is bound to.message - The message to add to the instance.NullPointerException - if either message or propertyName is null.public final void addMessages(Messages messages)
messages - The messages to add to the instance.NullPointerException - if messages is null.public final void addMessages(String propertyName, Messages messages)
propertyName - The name of a property messages are bound to.messages - The messages to add to the instance.NullPointerException - if either messages or propertyName is null.public Message[] getMessages()
getMessages in class IllegalTransactionExceptionpublic Message[] getMessages(String propertyName)
getMessages in class IllegalTransactionExceptionpropertyName - the name of a property to return any messages for.propertyName or an empty array if the instance does
not hold messages for a property with name propertyName.NullPointerException - if propertyName is null.public String[] getPropertyNames()
getPropertyNames in class IllegalTransactionExceptionCopyright © 2005–2014 jDTAUS. All rights reserved.