There are several types of errors that can occur during DataWindow processing. For example:
Data items that are invalid (discussed in “Manipulating data in a DataWindow control”)
Failures when retrieving or updating data
Attempts to access invalid or nonexistent properties or data
The DataWindow server throws the exceptions listed in Table 3-8. Your code should use try-catch blocks to trap these exceptions. See the online Help for each method to see which exceptions it can throw.
Exception |
When thrown |
---|---|
ChildNotFoundException |
If the requested child DataWindow was not found |
DataWindowLoadFailedException |
If the specified DataWindow object cannot be loaded |
DataWindowNotCreatedException |
If a method is called before creation of the DataWindow is completed |
DataWindowServerLoadFailedException |
If the DataWindow server cannot be loaded |
DbErrorException |
When a database error occurs |
InvalidColumnException |
When a method specifies an invalid column number or name |
InvalidExpressionException |
When an invalid expression is detected |
InvalidRowNumberException |
When a method specifies an invalid row number |
MethodFailureException |
Thrown for an otherwise undocumented failure of a method |
NoPermissionCreateFileException |
Thrown in a Web application when the ASP.NET process does not have permission to create a file |
NoPermissionCreateFolderException |
Thrown in a Web application when the ASP.NET process does not have permission to create a folder |
System.ArgumentException |
When a method specifies an invalid parameter |
System.ArgumentNullException |
When an argument is null |
System.ArgumentOutOfRangeException |
If an argument is not in range (not applicable to rows and columns – see IndexOutOfRangeException) |
System.IndexOutOfRangeException |
If an index is not in range (applies to code table methods) |
System.InvalidOperationException |
When an operation that is usually legal cannot be carried out because of the current state of the object |
System.NotSupportedException |
When a method is not supported for the DataWindow style |
TransactionException |
When there is an exception in a transaction operation |