I think you're being too rude here. Especially since your suggestion (including system error message) can be criticized. I don't know how does it happen in Python, but in .NET Framework, exception messages are not expected to be displayed to the end user. They are written for developers, and only for them. There are at least three reasons for that:
- The language of .NET Framework may be different from the UI language (including when the UI language is configurable by the user).
- The exception messages are sometimes scary or not helpful for an end user (Would you like to show to your user something like: "Object reference not set to an instance of an object"?).
- Giving an exact exception message is not very secure.
In his answer, Thorbjørn Ravn Andersen points the two most important problems with the code: no logging and abrupt exit. But what about the error message itself?
I would say it's not so bad compared to others. I see a lot of strange, wrong, unhelpful messages even in commercial popular products. Examples:
When dealing with the names of files which exceed 259 characters, Microsoft Word tells us a very helpful story that our floppy drive is too small (on a machine where there is no floppy drive at all) and suggests, guess what?... that we update our antivirus.
When something wrong happens in Visual Studio, sometimes it tells that, well, something wrong happened, but it doesn't bother to tell us what, and doesn't even want to tell where log files are (are those errors logged, by the way?).
On my old phone, when trying to send mails, it tells me something like "Operation failed". Oh, thanks for such details, now I know precisely what was wrong!
etc.
DailyWTF has also lots of examples of such error messages. Including pessimistic messages like "Error: success".
In many cases, you can see something like:
try
{
// Thousands of lines here (hopefully not in the same method).
}
catch (Exception) // After all, who cares about *what* is exactly the exception?
{
MessageBox.Show(@"Something went wrong. Please restart your application.
If you see this message again, contact your administrator.");
// And yes, we don't want to be polite, don't want to tell what's wrong,
// but want to suck administrators by telling them that they must contact
// themselves.
}
If you put a error message, if it's not correctly written (because you don't have time, or whatsoever), at least:
- Don't put stupid suggestions, like "contact your administrator",
- Make the error searchable on internet (including some error number can help), or at least make sure that there is only one error in a specific context.
- Ensure that the user can report you the error. Can you solve quickly the bug report if it says:
Bug 1024: I think I've found a bug. When working with your great and user friendly application, sometimes, it randomly displays "The application encountered a fatal error." message. Can you solve it, please?
...there is no actual problem to be solved: “I’m curious if other people feel like I do.”