|
ProgramixGenericLib v4.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.programix.da2.DATools
public class DATools
Contains various tools helpful in the work of the "data access layer".
| Method Summary | |
|---|---|
static DAException |
chainWithPrefix(String msg,
Throwable cause)
Returns a new DAException with that has the specified
cause chained to it and a message the starts with the specified
prefix and ends with the message from the cause. |
static DAException |
convert(Throwable x)
Takes the specified Throwable and wraps it in a DAException (if necessary). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DAException convert(Throwable x)
DAException (if necessary). If the type passed in is
already a DAException then that exception is simply
returned. This is useful in coding situations where only a
DAException is allowed to be thrown (and we don't want
to wrap a DAException within a DAException):
public String getSomething(int id) throws DAException {
try {
//...
} catch ( Exception x ) {
throw DATools.convert(x);
}
}
public static DAException chainWithPrefix(String msg,
Throwable cause)
DAException with that has the specified
cause chained to it and a message the starts with the specified
prefix and ends with the message from the cause.
|
ProgramixGenericLib v4.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||