- code
- engine-specific error code value. This is normally obtained as the Code member when an exception of type OcrException is thrown by this IOcrEngine.
Visual Basic (Declaration) | |
---|---|
Overridable Function GetErrorCodeString( _ ByVal code As Long _ ) As String |
Visual Basic (Usage) | Copy Code |
---|---|
|
Parameters
- code
- engine-specific error code value. This is normally obtained as the Code member when an exception of type OcrException is thrown by this IOcrEngine.
Return Value
A String that contains a short description of the error code value.This example will cause an error in the engine then catches and displays the error code message
Visual Basic | Copy Code |
---|---|
Public Sub GetErrorCodeStringExample() |
C# | Copy Code |
---|---|
public void GetErrorCodeStringExample() |
When a runtime error occurs in this IOcrEngine, an exception of type OcrException is thrown with the engine-specific error code set in the Code member. This error code is engine-specific but a short description can be obtained using the GetErrorCodeString method.
Logic errors such as invalid parameters to methods or invalid operations throw standard .NET exceptions (in this case, ArgumentException and InvalidOperationException respectively Errors caused by loading invalid image files using RasterCodecsInstance will throw exceptions of type RasterException. Errors for missing features (support locked) will throw OcrSupportLockedException exceptions. Any other runtime error in the engine will throw an OcrException.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family