News for hackers. Stuff that matters.
Re:A Manifesto For Error Reporting by islon on Tuesday March 05, 2013 @08:09AM (#5324242)
When I'm coding I normally think about 2 things:

- What should I do here to help me and other developers understand what's gone wrong. This generally results in one of the three categories:

    - Is it a "shouldn't happen" error like hardware malfunction, internet down, etc.
    - Is it a invalid data error, someone screwed data and I got the error here.
    - Is it a algorithm error, I got something wrong in my code and this wasn't supposed to happen.
- What should I show to my user. Divided in three categories too:

    - Unrecoverable error: should show a big red screen.
    - Recoverable error: should show a informative message with instructions.
    - Errors that don't affect the user: no need to show anything, just log the error.
Re:A Manifesto For Error Reporting by Roboprog on Wednesday March 06, 2013 @10:54AM (#5331745)
Who is this "user" you speak of? :-)

I'd extend that a bit for batch systems: invoke some kind of tool to file a trouble ticket to get the operations/support group's attention, as there won't be somebody sitting at a console to watch. Alternately, you could view this as generating a big red screen, just realize that any users are sitting "someplace else".

Yeah, some of us still have batch operations going, as well as a web app or two.

Re:A Manifesto For Error Reporting by HeyLaughingBoy on Tuesday March 05, 2013 @10:11AM (#5324841)
There's a third thing to consider: how to recover from the error. In many cases, the recovery is something the software has to do itself: e.g., server down, switch to alternate server.

My preference is to consider error reporting as something completely separate from error handling. This is even more the case if you have different classes of users.

Re:A Manifesto For Error Reporting by stinos on Tuesday March 05, 2013 @09:20AM (#5324573)
all well, but that 3rd one highly depends on context. If I have an application for collecting/analysing data that is going to be used to publish papers and whatnot, it is absolutely critical the algorythms I write are ok no matter what. If they are not, it's time to go berserk (as in the 1st one). Ignoring it would be the worst I can do at that point.