|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--uk.org.ogsadai.common.exception.DAIException
Base class for all OGSA-DAI exceptions which are to be presented to a user or OGSA-DAI administrator.
Instances of this class contain an mMessageNumber field
and an mParams field. These are used in conjunction to
uniquely identify an error message in the message bundle. mParams
is an array of strings which are to be substituted into marked positions
in message number mMessageNumber from the message bundle
in the user's favourite language.
For OGSA-DAI exceptions which arise as a result of another
exception being raised, the optional field mException can
be used to contain this exception.
| Field Summary | |
protected java.lang.Throwable |
mException
The exception which caused this exception to be thrown, if any. |
protected int |
mMessageNumber
The index of the exception's message in the message bundle. |
protected java.lang.String[] |
mParams
The parameters to substitute into the exception's message. |
| Constructor Summary | |
DAIException(int num,
java.lang.Object[] params)
Construct a new OGSA-DAI exception, using a specified message from the message bundle. |
|
DAIException(int num,
java.lang.Object[] params,
org.apache.log4j.Logger logger)
Construct a new OGSA-DAI exception, using a specified message from the message bundle, supplying an exception which caused this exception to be thrown. |
|
DAIException(int num,
java.lang.Object[] params,
java.lang.Throwable ex)
Construct a new OGSA-DAI exception, using a specified message from the message bundle, supplying an exception which caused this exception to be thrown. |
|
DAIException(int num,
java.lang.Object[] params,
java.lang.Throwable cause,
org.apache.log4j.Logger logger)
Construct a new OGSA-DAI exception, using a specified message from the message bundle, supplying an exception which caused this exception to be thrown. |
|
| Method Summary | |
java.lang.Throwable |
getException()
Return the exception which caused this exception to be thrown. |
java.lang.String |
getLocalizedMessage()
A DAIException contains enough information to enable us to translate the message into any language. |
int |
getMessageNumber()
Return the number of the message from the message bundle. |
java.lang.String[] |
getParams()
Return the parameters to be substituted into the message at the appropriate positions. |
static java.lang.String |
stackTraceToString(java.lang.Throwable ex)
Utility method for retrieving the stacktrace as a String from an exception |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final int mMessageNumber
protected final java.lang.String[] mParams
protected final java.lang.Throwable mException
| Constructor Detail |
public DAIException(int num,
java.lang.Object[] params)
num - the index of the message in the message bundleparams - the parameters to substitute into the message,
or null if the message expects no
parameters
public DAIException(int num,
java.lang.Object[] params,
java.lang.Throwable ex)
num - the index of the message in the message bundleparams - the parameters to substitute into the message,
or null if the message expects no
parametersex - the exception which caused this exception to be thrown
public DAIException(int num,
java.lang.Object[] params,
org.apache.log4j.Logger logger)
num - the index of the message in the message bundleparams - the parameters to substitute into the message,
or null if the message expects no
parameterslogger - the logger to use to log the exception message
public DAIException(int num,
java.lang.Object[] params,
java.lang.Throwable cause,
org.apache.log4j.Logger logger)
num - the index of the message in the message bundleparams - the parameters to substitute into the message,
or null if the message expects no
parameterscause - the exception which caused this exception to be thrownlogger - the logger to use to log the exception message| Method Detail |
public java.lang.String getLocalizedMessage()
getLocalizedMessage in class java.lang.Throwablepublic static java.lang.String stackTraceToString(java.lang.Throwable ex)
ex - The exception
public java.lang.Throwable getException()
null if none was specifiedpublic int getMessageNumber()
public java.lang.String[] getParams()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||