Skip to main content

Better stack traces

Posted by staufferjames on May 17, 2007 at 8:54 AM PDT

ClassCastException didn't used to have a message but I noticed that now it has a message that includes the cast class and the object class. That extra info is very beneficial. (Note that only recently could I start using 1.5 in my main product so I am behind the times a bit.)

What other common Throwables need improved messages?

NullPointerException should have the name of the variable. I entered an RFE for this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4834738

I created another RFE to be able to add extra info to stack traces.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4857236

Related Topics >>