Applications in the Common Desktop Environment follow a common model for presenting error messages and warnings. Users running your application expect messages to be displayed in message footers, error dialog boxes, or warning dialog boxes, with further explanations available in online help, when appropriate.
This section outlines conventions for displaying error messages in your application. Because of the way message text is handled, it is important to follow these error presentation guidelines precisely. For example, casual users who start your application from the Front Panel never see messages that you send to standard error or standard out. In the Common Desktop Environment, such messages are directed to log files ($HOME/.dt/*log) that many users do not routinely examine or know about.
Follow these rules when deciding where to tell users about warnings, messages, and error conditions:
If this message is informational, display the text in the message footer of the application. (Example: "MyDoc file copied.")
If this message is about an error or serious warning--a problem where an operation important to the user has failed--display an error dialog box or warning dialog box.
A good error dialog or warning dialog gives a user the following information:
What happened (from the user's point of view)
Why it happened, in simple language
How to fix the problem
In cases where additional background information is required, or where it takes more than four or five lines of a dialog to completely explain an error, add a button that links the user to the appropriate section of online help.
For details on displaying error messages in your application and linking message dialogs to online help, see the Solaris Common Desktop Environment: Programmer's Guide.