1

So I have this code.

try{
    //83 lines of stuff
} catch(Exception e){
    logger.writeLogError("*********FAILURE BEGIN*********\n");
     // Need to catch top level Exception here.  If an exception is thrown but not caught,
// the notification will not write to the database or be sent to the user.
// This would be extremely difficult to troubleshoot.
    e.printStackTrace();
    logger.writeLogError("*********FAILURE END*********\n");
}

which seems to be sometimes outputting this for some reason:

ERROR [com.place.obfuscation.Class] (WorkerThread#39[192.168.136.172:55767]) *********FAILURE BEGIN*********
ERROR [STDERR] (WorkerThread#39[192.168.136.172:55767]) java.lang.NullPointerException
ERROR com.place.obfuscation.Class] (WorkerThread#39[192.168.136.172:55767]) *********FAILURE END*********

Why is the stack trace buried? Shouldn't there be more to it than that?

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
mstabosz
  • 55
  • 2
  • 9
  • Try `e.getSupressed()` on the off chance that underlying code is using try-with-resources. – Paul Oct 26 '22 at 18:17

0 Answers0