Skip navigation FileNet logo
  Open Client Developer's Guide
  Search  |  Index  |  Glossary   |  
Open menu Overview
Open menu Open Client Architecture
Open menu Developing for Process
Close menu Error and Exception Handling
  Open menu Error Handling
  Open menu Exception Handling
Open menu Customizing the Framework
Globalization / Localization
Open menu General Information
   

Error and Exception Handling

Each 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 Conventions

Error code key names in the Open Client toolkit are composed of the following:

  • FN_ERR prefix, which denotes that this is an exception error.
  • Followed by another prefix, which represents the application feature area or category, of which the error code is a member
  • Followed by the actual error code name or identifier

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:

Public Enum FN_ERR_START_RANGE
   ERR_START = 10000
   ERR_GEN_BASE = ERR_START
   ERR_DP_BASE = ERR_START + 1000
   ERR_SEARCH_BASE = ERR_START + 2000
   ERR_UI_BASE = ERR_START + 3000
   ERR_CF_BASE = ERR_START + 4000
   WARNING_START = 20000
   WARN_GEN_BASE = WARNING_START
   WARN_DP_BASE = WARNING_START + 1000
   WARN_SEARCH_BASE = WARNING_START + 2000
   WARN_UI_BASE = WARNING_START + 3000
   WARN_CF_BASE = WARNING_START + 4000

End Enum

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):

Public Enum
   FN_ERR_SEARCH ContentValueNotValid = FN_ERR_BASE.ERR_SEARCH_BASE
   FileNotFound
   InvalidOpFoundinXMLCommand
   InvalidSearchTemplate
   InvalidSystemType
   LibraryNotFound
   SearchTypeNotSupported
   SimpleSearchNotAvailable
   TemplateExecutionFailed
   WordOrderIndexOutOfRange
   XMLParseError
   UnkownError
   MinorError = FN_ERR_BASE.WARN_SEARCH_BASE
End Enum

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:

FN_ERR_SEARCH_FileNotFound

The following table identifies some other possible error code key names:

 Category

 Prefix

 Examples of Key Names

General

FN_ERR

FN_ERR_InvalidSystemType

Data Provider

FN_ERR_DP

FN_ERR_DP_DocumentNotFound

Control Factory

FN_ERR_CF

FN_ERR_CF_InvalidUserInput

Add

FN_ERR_BROWSE

FN_ERR_BROWSE_InvalidUserName

Process

FN_ERR_Process

FN_ERR_Process_ActionNotSelected