The OcrException Class is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.
The exception that is thrown when a runtime error occurs inside the IOcrEngine![](dotnetdiagramimages/Leadtools_Forms_Ocr_Leadtools_Forms_Ocr_OcrException.png)
Visual Basic (Declaration) | |
---|---|
<SerializableAttribute()> Public Class OcrException Inherits System.Exception Implements _Exception, ISerializable |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As OcrException |
C# | |
---|---|
[SerializableAttribute()] public class OcrException : System.Exception, _Exception, ISerializable |
C++/CLI | |
---|---|
[SerializableAttribute()] public ref class OcrException : public System.Exception, _Exception, ISerializable |
When a runtime error occurs in the 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 System.Exception.Message property of this class or by using the IOcrEngine.GetErrorCodeString method.
Logic errors such as invalid parameters to methods or invalid operations throw standard .NET exceptions (in this case, System.ArgumentException and System.InvalidOperationException respectively Errors caused by loading invalid image files using IOcrEngine.RasterCodecsInstance will throw exceptions of type Leadtools.RasterException. Errors for missing features (support locked) will throw OcrSupportLockedException exceptions. Any other runtime error in the engine will throw an OcrException.
System.Object
System.Exception
Leadtools.Forms.Ocr.OcrException
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7