NetBeans pops up a dialog with an exception message when it finds an internal error. And again. And again. And again. And again. This blog reviews just how user-hostile this behavior is, and suggests alternatives.

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 dialog.


Clicking on "Show Details" revealsi


What's wrong with it?

What can one learn from this? Here are some points worth keeping in mind if you ever design an error handling mechanism.

  1. 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.
  2. 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 paranoid.
  3. 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.
  4. 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:

Hi Cay,

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.