final class DBGlobalsException extends Exception
{
String mistake;
//where this is shorthand for chained constructors that look like Exception
DBGlobalsException(String message, Throwable cause)
{
super(message,cause);
}
// elaborate your exception with whatever error state you want to propagate outwards
void setField(mistake) {
}
}
catch (IOException ex) {
DBGlobals.Error("OHMjson.Graph.saveLastGraphName - Error: " + ex.getMessage());
msg = "Unable to save data";
status = false;
DBGlobalsException dbe = new DBGlobalsException(msg,ex);
dbe.setField(status);
throw dbe;
}
This post code is taken from my previous post...
http://stackoverflow.com/users/recent/454848
Please correct me if i am wrong...
- What does the setField method do? Do we need one.
- throw dbe would throw me the expection and the message being appended.
- What does chained construtor mean, is it like having multiple constructors.