java.lang.Object
java.lang.Throwable
java.lang.Exception
com.lutris.util.ChainedException
com.lutris.dods.builder.generator.query.DataObjectException
- All Implemented Interfaces:
- com.lutris.util.ChainedThrowable, java.io.Serializable
- public class DataObjectException
- extends com.lutris.util.ChainedException
DataObjectException class, used by Business Objects, catch all the
DataObject Exceptions, will be passed to POs and handled there.
Need to state the reasons.
Usage:
import myapp.business.*;
try {
some access of DOs
}
catch (SQLException sqlEx) {
if (sqlEx.getSQLState().startsWith("02") &&
(sqlEx.getErrorCode() == 100)) {
String msg = "Update or delete DO is out of synch";
throw new DataObjectException(msg, sqlEx);
}
else if (sqlEx.getSQLState().equals("S1000") &&
(sqlEx.getErrorCode() == -268)) {
String msg = "Integrity constraint violation";
throw new DataObjectException(msg, sqlEx);
}
else {
String msg = "Data Object Error";
throw new DataObjectException(msg, sqlEx);
}
}
catch (DatabaseManagerException connEx) {
String msg = "Database connection Error";
throw new DataObjectException(msg, connEx);
}
catch (ObjectIdException oidEx) {
String msg = "Object ID Error";
throw new DataObjectException(msg, oidEx);
}
- Version:
- $Revision: 1.3.12.1 $
| Nested classes inherited from class java.lang.Throwable |
|
| Fields inherited from class java.lang.Exception |
|
| Fields inherited from class java.lang.Throwable |
|
DataObjectException
public DataObjectException(java.lang.String msg)
- Construct a exception without a specified cause.
DataObjectException
public DataObjectException(java.lang.String msg,
java.lang.Throwable cause)
- Construct a exception with an associated causing exception.