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 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also