public abstract class IllegalTransactionException extends IllegalArgumentException
Example: Catching an IllegalTransactionException
catch(IllegalTransactionException e) { if(e.getMessages().length > 0) { Fetch messages for well-known properties first (optional). e.getMessages(Transaction.PROP_XYZ); ... Fetch all remaining messages. e.getMessages(); ... } }
Constructor and Description |
---|
IllegalTransactionException()
Creates a new
IllegalTransactionException instance. |
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the message of the exception.
|
abstract Message[] |
getMessages()
Gets all messages describing the exception.
|
abstract Message[] |
getMessages(String propertyName)
Gets messages bound to a property removing these messages from the instance.
|
abstract String[] |
getPropertyNames()
Gets the names of all properties for which the exception holds messages.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public IllegalTransactionException()
IllegalTransactionException
instance.public String getMessage()
getMessage
in class Throwable
public abstract Message[] getMessages()
public abstract Message[] getMessages(String propertyName)
propertyName
- 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 abstract String[] getPropertyNames()
Copyright © 2005–2014 jDTAUS. All rights reserved.