ImageGear .NET v25.1 - Updated
Error Handling
User Guide > How to Work with... > OCR > Concepts > Error Handling

The ImageGear OCR API reports errors in the same way as the other ImageGear APIs. OCR API uses ImGearOCRException for error reporting. This exception is inherited from ImGearException with an ErrorCode that begins with REC.

When an error occurs in the underlying native modules, ImageGear throws an ImGearOCRException with an ErrorCode of REC_ENGINE_FAILURE. You can use the Value1 property of ImGearException to obtain the original error code from the native recognition engine. This native code is duplicated in the System.Exception.Data dictionary as the Status member.

The error codes returned by the native recognition engine tend to indicate an internal error has occurred. If any of these errors are encountered, please contact Accusoft support to determine the appropriate course of action.

Here is a list of the internal error codes, along with a brief description. Note that these codes and meanings may change without notice.

Internal Error Code Description
0 No error occurred.
1 An internal parameter was invalid.
2 An internal parameter was out of range.
3 An internal bitmap was found in an inconsistent state.
4 Could not read an internal bitmap.
5 No result was returned from an internal function when a result was expected.
6 An invalid internal index was found.
7 An internal state is in an invalid state.
8 An internal field type is invalid.
9 An internal regular expression is invalid.
10 An internal data validation list is invalid.
11 An internal license is invalid.
12 An error was caused by an internal timeout.
13 An internal image was not available.
14 A general internal error has occurred. The Message member of the exception Data dictionary may contain an additional description of the error.
15 An internal area is invalid.
16 An internal syntax error has occurred.
18 An internal out of memory error has occurred.
19 An internal device independent bitmap was not set.
20 An internal picture was not set.
21 No internal data was found.
23  An internal transport error occurred.
24 An internal file read error occurred.
25 An internal method failed to perform. 
40 Could not create an internal director.
41 Unable to open or create an internal file.
42 An internal file in use error occurred.
43 An internal file path was not found.
44 An internal file was not found.
50 An internal reevaluation error occurred.
51 An internal classifier was unsupported.
107 An invalid internal resolve state occurred.
207 An invalid internal merge state occurred.