How Not to Report an Internal Error
I got up early this morning to get some coding done. Instead, I am
writing this blog.
Something in NetBeans has become unstable, and it pops up this
Clicking on "Show Details" reveals
What's wrong with it?
- Why do I have to report the error? It wasn't my fault in the first
place. NetBeans should offer to report it on my behalf. It is ok to give
me a manual reporting URL; after all, I may not trust the electronic
submission. But that should be my choice.
- Why does the message peter out in the middle of the last sentence? I
tried resizing the dialog, and it doesn't reveal the log location. I
already have a low opinion of software that generates unexpected
exceptions. When I see a sloppy dialog, my confidence goes completely
down the drain.
- Why does the dialog pop up again, and again, and again, and again?
There is no way of turning it off. I tried cleaning the project, closing
and reopening the project, exiting and restarting NetBeans, and the
error keeps popping up. For the love of Mike, if you know that your
software is unstable enough to report the occasional "unexpected
exception", give the user a way to get rid of it.
What can one learn from this? Here are some points worth keeping in
mind if you ever design an error handling mechanism.
- When you report an error, don't piss off the user more than you
have to. Your user is already going to be unhappy at this point.
Make sure you put your best foot forward now. Make a framework for
reporting, and test the heck out of the error reporting process. Don't
tolerate the slightest sloppiness.
- It is a good idea to allow the user to report errors. It makes the
user feel that you want feedback, and it might actually help your QA
effort. Make error reporting super-easy. Your user should be able
to click a button, see the report that you are about to send off, and
click another button to confirm. Also give a manual method for the
- If your software is worth anything to your users, they can't just
wait for you to fix the bug that caused the unexpected error. Don't
stand in the way of continued usage. Give options for recovery,
e.g. to rebuild the internal state, or to turn off inessential features.
- Whatever you do, don't do something as pointless and stupid as
popping up the same error again and again. After seeing that NetBeans
dialog for the tenth time, my brain perceived a subtle change in the
wording. It now seemed to say "Instead of wasting your time, why don't
you try loading this project into Eclipse?"
P.S. I just finished writing this blog, and I got this email:
try to delete MDR cache in your userdir. It's stored in your home
directory in .netbeans/var/cache. You can safely delete it, it will be
It took care of my problem.
That's another option for dealing with unexpected errors in your
software. Have someone on staff 24/7 to monitor the user forum, and make
sure they reply to complaints faster than it takes disgruntled users to
blog about them.