|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.virtuosotechnologies.lib.error.UserMessageExceptionFormatter
Exception formatter that generates user-interpretable messages.
This class is fully synchronized and thread-safe.
Method Summary | |
static UserMessageExceptionFormatter |
createEmpty()
Construct a formatter with no generators installed, and without a source of default generators. |
static UserMessageExceptionFormatter |
createWithDefaults()
Construct a formatter using the default global formatter as the parent. |
static UserMessageExceptionFormatter |
createWithDefaults(UserMessageExceptionFormatter parent)
Construct a formatter with the given source of default generators |
String |
format(Throwable ex,
PropertySet properties)
Generate a String representation of the given exception. |
static UserMessageExceptionFormatter |
getGlobalFormatter()
Get the global default formatter. |
static void |
installGlobalDefaultUserMessageGenerator(UserMessageGenerator generator)
Install a global default UserMessageGenerator |
void |
installUserMessageGenerator(UserMessageGenerator generator)
Install a UserMessageGenerator |
boolean |
removeUserMessageGenerator(UserMessageGenerator generator)
Remove a UserMessageGenerator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static UserMessageExceptionFormatter getGlobalFormatter()
public static void installGlobalDefaultUserMessageGenerator(UserMessageGenerator generator)
generator
- UserMessageGenerator to addpublic static UserMessageExceptionFormatter createEmpty()
public static UserMessageExceptionFormatter createWithDefaults()
public static UserMessageExceptionFormatter createWithDefaults(UserMessageExceptionFormatter parent)
parent
- parent UserMessageExceptionFormatter, acting as a source for default generatorspublic void installUserMessageGenerator(UserMessageGenerator generator)
generator
- UserMessageGenerator to addpublic boolean removeUserMessageGenerator(UserMessageGenerator generator)
generator
- UserMessageGenerator to remove
public String format(Throwable ex, PropertySet properties)
format
in interface ExceptionFormatter
ex
- throwableproperties
- formatter-specific properties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |