KeyView 24.3

# Exceptions

When an error occurs, KeyView can throw an exception. Some of these may be exceptions that are defined by the .NET standard library.

The Filter .NET API defines additional exceptions for problems that can occur specifically with KeyView. These are described in the table below, and are an instance of `KeyViewException`, or are derived from `KeyViewException`, which is itself derived from `System.Exception`. These exceptions have an `ErrorCode` property - an `int` that corresponds to an error code defined in the C API.

Your application code can handle these exceptions - for example, if you are processing a file and KeyView throws a `FormatNotSupportedException` you might skip the file or to add it to a list of files that could not be processed.

Exception class | Description | ErrorCode
--- | --- | ---
`KeyViewException` | An exception related to KeyView functionality. | Any defined in the C API
`AutoDetFailException` | An error occurred when attempting to detect the format of the input document. | 10
`AutoDetNoFormatException` | KeyView did not recognize the format of the input document. | 11
`BadInputStreamException` | Invalid or corrupt input stream. | 4
`ChildTimeOutException` | The requested operation took too long. | 19
`FormatNotSupportedException` | The requested operation is not supported for this file format. | 7
`InputFileNotFoundException` | KeyView could not find the input file. | 24
`OpenOutputFileFailedException` | KeyView could not open the output file. | 25
`PasswordProtectedException` | To open this file, you must provide a password. | 8

Finally, KeyView can throw a `ResourceClosedException`, which indicates that a required resource has been closed. For example, you cannot call methods on a `Document` object after you dispose of your KeyView `Session`.

Copyright 1997-2024 Open Text
Version 24.3 | Last updated June 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.3

Topic Title: Exceptions