Get last exception?
809546Oct 30 2010 — edited Oct 31 2010I have code with lots of :
try {...}
catch (Exception e)
{
e.printStacktrace();
System.exit(1);
}
I've now added a shutdown hook, and I'd like to be able to get hold of e - the last exception thrown before the JVM shut down.
Is there any way to do this? Failing that, is there any way I can hook into something to record all exceptions thrown?
Ta!