|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.core.exception.JbbExceptionHandler
public class JbbExceptionHandler
This class handles linked/chained exceptions
| Constructor Summary | |
|---|---|
JbbExceptionHandler()
Constructor |
|
| Method Summary | |
|---|---|
static JbbExceptionHandler |
getInstance()
This method returns an instance of the JbbExceptionHandler class. |
String |
getMessage(Throwable zException)
Retrieves the message from the exception or from its predecessor if the top exception is not populated |
String |
getMessage(Throwable zException,
int zStringMaxSize)
Calls printStackTrace() for all the exceptions in the chain + limit the size of the resulting string to the given number of characters |
Throwable |
getRootCause(Throwable zException)
|
String |
getRootCauseMessage(Throwable zException)
Retrieves the message from the root cause |
String |
getRootCauseMessage(Throwable zException,
int zMaxSize)
Retrieves the message from the root cause |
String |
getStackTrace(Throwable zException)
Calls printStackTrace() for all the exceptions in the chain |
String |
getStackTrace(Throwable zException,
int zStringMaxSize)
Calls printStackTrace() for all the exceptions in the chain + limit the size of the resulting string to the given number of characters |
String |
getSummaryString(JbbException zException)
Combines the message and stack trace in one string This is ideal for logging an exception on stdout or in a log file |
String |
getSummaryString(JbbException zException,
int zMaxSize)
Combines the message and stack trace in one string This is ideal for logging an exception on stdout or in a log file |
String |
getSummaryString(Throwable zException)
Combines the message and stack trace in one string This is ideal for logging an exception on stdout or in a log file |
String |
getSummaryString(Throwable zException,
int zMaxSize)
Combines the message and stack trace in one string This is ideal for logging an exception on stdout or in a log file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JbbExceptionHandler()
| Method Detail |
|---|
public static final JbbExceptionHandler getInstance()
public String getStackTrace(Throwable zException)
zException - the exception
Exception
public String getStackTrace(Throwable zException,
int zStringMaxSize)
zException - the exceptionzStringMaxSize - the max string size (i.e. to limit the size of the exception stack trace)
Exceptionpublic String getMessage(Throwable zException)
zException - the exception
Exception
public String getMessage(Throwable zException,
int zStringMaxSize)
zException - the exceptionzStringMaxSize - the max string size (i.e. to limit the size of the exception stack trace)
Exceptionpublic Throwable getRootCause(Throwable zException)
zException -
public String getRootCauseMessage(Throwable zException)
zException - the exception
Exception
public String getRootCauseMessage(Throwable zException,
int zMaxSize)
zException - the exception
Exceptionpublic String getSummaryString(Throwable zException)
zException - the exception
Exception
public String getSummaryString(Throwable zException,
int zMaxSize)
zException - the exception
Exceptionpublic String getSummaryString(JbbException zException)
zException - the exception
Exception
public String getSummaryString(JbbException zException,
int zMaxSize)
zException - the exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||