The exception that is thrown when an OCR error occurs.
Syntax
Example
Visual Basic | Copy Code |
---|
Public Sub RasterDocumentExceptionExample()
Try
Dim ocr As RasterDocumentEngine
ocr = RasterDocumentEngine.Instance
ocr.Startup()
ocr.Shutdown()
Catch ex As RasterDocumentException
MessageBox.Show(String.Format("OCR Error.{0}Code: {1}{0}Message: {2}", Environment.NewLine, ex.Code, ex.Message))
Catch ex As Exception
MessageBox.Show(String.Format("General error: {0}", ex.Message))
End Try
End Sub |
C# | Copy Code |
---|
public void RasterDocumentExceptionExample() { // startup and shutdown the OCR engine try { RasterDocumentEngine ocr; ocr = RasterDocumentEngine.Instance; ocr.Startup(); //... ocr.Shutdown(); } catch(RasterDocumentException ex) { // ocr error, show the code and message MessageBox.Show(string.Format("OCR Error.{0}Code: {1}{0}Message: {2}", Environment.NewLine, ex.Code, ex.Message)); } catch(Exception ex) { // other errors MessageBox.Show(string.Format("General error: {0}", ex.Message)); } } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also