|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Throwable Exception hirondelle.web4j.model.AppException
public class AppException
Base class for most exceptions defined by WEB4J.
Differs from most exception classes in that multiple error messages may be used, instead of just one. Used in JSPs to inform the user of error conditions, usually related to user input validations.
This class is Serializable
, since all Throwable
s are serializable.
Constructor Summary | |
---|---|
AppException()
No-argument constructor. |
|
AppException(String aMessage,
Throwable aThrowable)
Constructor. |
Method Summary | |
---|---|
void |
add(AppException ex)
Add all AppResponseMessage s attached to aAppEx to this list. |
void |
add(String aErrorMessage)
Add a simple AppResponseMessage to this list. |
void |
add(String aErrorMessage,
Object... aParams)
Add a compound AppResponseMessage to this list. |
List<AppResponseMessage> |
getMessages()
Return an unmodifiable List of AppResponseMessage s. |
boolean |
isEmpty()
Return true only if there are no messages in this list. |
boolean |
isNotEmpty()
Return the negation of MessageList.isEmpty() . |
String |
toString()
Intended for debugging only. |
Methods inherited from class Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AppException()
public AppException(String aMessage, Throwable aThrowable)
aMessage
- text describing the problem. Must have content.aThrowable
- root cause underlying the problem.Method Detail |
---|
public final void add(String aErrorMessage)
MessageList
AppResponseMessage
to this list.
The argument satisfies the same conditions as AppResponseMessage.forSimple(java.lang.String)
.
add
in interface MessageList
public final void add(String aErrorMessage, Object... aParams)
MessageList
AppResponseMessage
to this list.
The arguments satisfy the same conditions as AppResponseMessage.forCompound(java.lang.String, java.lang.Object...)
.
add
in interface MessageList
public final void add(AppException ex)
MessageList
AppResponseMessage
s attached to aAppEx to this list.
add
in interface MessageList
public boolean isEmpty()
MessageList
Note that this method name conflicts with the empty keyword
of JSTL. Thus, MessageList.isNotEmpty()
is supplied as an alternative.
isEmpty
in interface MessageList
public final boolean isNotEmpty()
MessageList
MessageList.isEmpty()
.
isNotEmpty
in interface MessageList
public final List<AppResponseMessage> getMessages()
MessageList
AppResponseMessage
s.
getMessages
in interface MessageList
public String toString()
toString
in class Throwable
|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |