Sets the error string that corresponds to a specific WiaExceptionCode.
public static void SetCodeMessage(Leadtools.Wia.WiaExceptionCode code,string message)
Public Shared Sub SetCodeMessage( _ByVal code As Leadtools.Wia.WiaExceptionCode, _ByVal message As String _)
public:static void SetCodeMessage(Leadtools.Wia.WiaExceptionCode code,String^ message)
code
A WiaExceptionCode value for which the error string is being set.
message
A System.String that contains the new message for
By default, WiaException has a string message for each WiaExceptionCode. You can get this message by using the GetCodeMessage method. Also, you can change any string message for any WiaExceptionCode by using the SetCodeMessage method.
Imports LeadtoolsImports Leadtools.Wia<Test> _Public Sub SetCodeMessageExample()' Get the initial FileFormat messageDim code As WiaExceptionCode = WiaExceptionCode.PaperEmptyDim message As String = WiaException.GetCodeMessage(code)MessageBox.Show(String.Format("Code: {0}, message: {1}", code, message))' make sure that this message is used nowTryThrow New WiaException(code)Catch ex As ExceptionMessageBox.Show(ex.Message)End Try' change this message to a custom oneWiaException.SetCodeMessage(code, "My new message")' make sure that this new message is used nowTryThrow New WiaException(code)Catch ex As ExceptionMessageBox.Show(ex.Message)End TryEnd Sub
using Leadtools;using Leadtools.Wia;public void SetCodeMessageExample(){// Get the initial FileFormat messageWiaExceptionCode code = WiaExceptionCode.PaperEmpty;string message = WiaException.GetCodeMessage(code);MessageBox.Show(string.Format("Code: {0}, message: {1}", code, message));// make sure that this message is used nowtry{throw new WiaException(code);}catch(Exception ex){MessageBox.Show(ex.Message);}// change this message to a custom oneWiaException.SetCodeMessage(code, "My new message");// make sure that this new message is used nowtry{throw new WiaException(code);}catch(Exception ex){MessageBox.Show(ex.Message);}}
|
Products |
Support |
Feedback: SetCodeMessage Method - Leadtools.Wia |
Introduction |
Help Version 19.0.2017.3.21
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.