![]() ![]() |
|
Open Client Developer's Guide | |
Search | Index | Glossary | | |
![]() |
|
![]() |
![]() |
![]() |
Error and Exception HandlingEach layer within the Open Client MVC design pattern (the data model Data Providers, the viewable User Controls, and the containing / controlling ASPX Pages) perform error handling and exception throwing differently. Naming ConventionsError code key names in the Open Client toolkit are composed of the following:
The combination of FN_ERR and the category prefix creates a class name that can be used to determine the type of error exception that has been throw. In addition, each category is assigned a range of possible numbers, beginning with a specific number defined in FN_ERR_START_RANGE:
This numbering scheme supports the use of the enumerator type when specifying error code identifiers for each category. For example, the following enumerator could be used to specify the possible error code identifiers generated by the application Search functionality area (category):
Prepending the class name to the error identifier reates the error code key. The error code key is added to the resource file for each supported language and is also defined in the localized message string. In order to display the correct error message string for each locale, the localized message is retrieved from the resource file using the error code key. For example, the key for the Search category error code FileNotFound is defined as follows:
The following table identifies some other possible error code key names:
|
![]() |
|