![]() ![]() |
|
Open Client Developer's Guide | |
Search | Index | Glossary | | |
![]() |
|
![]() |
![]() |
![]() |
Defining a New ExceptionIn ASP.NET, developers can define a new exception class to take different actions based on the exception class. To do this, use the FnWSException exception to throw the Open Client exception, which is defined in FnOpenClient. FnWSException is the base exception class for all other Open Client exceptions.
When defining a new exception class, follow these guidelines:
Exception Naming ConventionsFor detailed information on naming conventions or error messages, see Error Naming Conventions.
When throwing an exception, use the FnResourceManager to obtain the correct localized string as follows:
Use the placeholder {n} to specify the portion of the error message that should be supplied at runtime. For example:
The strings that will replace the error message placeholders at runtime, should be passed in as an array of strings. The first placeholder in the error message will be replaced by the first element of the string array, the second place holder, the second element of the string array, and so on. The following code fragment demonstrates the use of an array of strings:
The completed error message that will be returned is:
|
![]() |
|