News for hackers. Stuff that matters.
Re:A Manifesto For Error Reporting by Roboprog on Tuesday March 05, 2013 @10:22AM (#5324920)
God knows I've seen enough "two year old" error messages: "I don't like it! <spits out>". Well, what would you like, you sniveling little diaper wetting sot of a program?!?

I could not agree more with his comment about "Bad value {X} should be ...".

Oh, and the part about the amazing disappearing stack trace -- I've seen way too much "print e.toString()" which discards all that wonderful "where" information.

Re:A Manifesto For Error Reporting by moe on Tuesday March 05, 2013 @10:42AM (#5325067)
disappearing stack trace

In many (most?) OO-languages it takes a surprising amount of gymnastics to properly chain exceptions. Especially if you're a library-author depending on other libraries.

The blame goes squarely to the language designers here. This feature should be baked into the core of every language because adding it with a 3rd party library is far from trivial in most.

Here's an example of such a library (ruby): https://github.com/pangloss/nested_exceptions

Use it!

Re:A Manifesto For Error Reporting by Roboprog on Wednesday March 06, 2013 @10:47AM (#5331708)
For all my grumbling about Java, I guess exception chaining is one thing they actually did get right from the beginning:

throw new RuntimeException( "App feature X broke ...", e);

Could be worse, could be C -- setjmp/longjmp :-)

Actually, longjmp is pretty useful, but it typically makes for "course grained" error handling, and you better have a good error message logged before jumping back. As well as protect yourself from resource leaks...