|
|
|
Errors can be divided into three broad categories:
Program errors, such as an attempt to access an element beyond the bounds of an array or buffer,
Environment errors, such as insufficient memory, insufficient disk space, or other missing resources,
User errors, such as an attempt to enter bad data in a dialog, an invalid action in an application or bad format of a file.
Error handling is about taking care of environment and user errors in a user-friendly way. Program errors should ideally not exist in the first place since this means that the part of the program that contains the error needs to be re-written.
There are suggestions in the UIQ Style Guide about how the user should be informed.
The user should be informed about any error that prevents the selected task from being completed. In addition, after an error has been handled it should be possible to continue to use the application, possibly after remedial actions as suggested by the error message.
The user should be informed about all errors preventing a user-initiated task from being completed successfully.
Any error messages intended for user processing should be easily understandable.
Errors can be propagated from a server or protocol that has been trapped from an application engine as an error code. These errors should be communicated to the user in human-readable form.
Application-specific errors must be defined by the application and must be different from framework error codes.
Error messages should be easily understandable, not just an error code.
An application should not assume just one type of error if there are alternatives. For example, give the user correct information and make a distinction between a “disk is full” error message and a “disk is write protected” message.
Error information should be informative and correct.
An application should not use multiple messages or dialogs to inform the user about a failed action. That is, do not use one message to indicate the failure and another to describe the reason.
An application should display one error message per fault.