Applications can always throw errors. If such an error occurs, the user should be notified, because what he asked the application to do has not succeeded.However, how much information should the user be given? I think most of us agree on not showing a stack trace (Should a stack trace be in the error message presented to the user?), but I can't find a question about the rest of the error contents or what to show to the user.For example, a language supporting exceptions (.net, java) has the exception type to share, where the exception occured, and a somewhat clarifying message to go along with the exception. Should this also be hidden from the user? Or should we show this anyway? Or should we show a generic message? or should we show one of a number of messages based on what the underlying exception is?
How much information about an error should be shown to the user?
user interface;error handling;user experience;error messages;information presentation
what to show to the user.  Should this also be hidden from the user? You show the user what is actionable for them.For example, if you have an error which is caused because of some null pointer exception and more of a bug than user error you don't want full explanation because they can't do anything different.Or should we show this anyway? Or should we show a generic message?Showing the exception as the primary error message content is pointless for most users. Perhaps if your target user base is developers you could show the information as the full error all the time (maybe you have an internal application for automated testing). But generally users cannot do anything different even with that knowledge.should we show one of a number of messages based on what the underlying exception is?The best strategy is to do the following:Interpret the error into text which is meaningful for the user.Part of this is what can the user do differently?If they can't do anything different, say something like an unexpected error has occurred.Add an optional detailed error descriptionAllow users to submit the error report (or do this automatically, depending on user base)ExampleIt shows the here's what happened (unexpected error)Tells user what to do (reopen Mail, even includes a shortcut to do this)Also has a view details if someone is curious to see the full technical errorProvides notification an error error report is filed (see below)Note that in some cases you may wish to make the error report be manual vs automatic.