The DebugMode property gets or sets a boolean value to define if a
error message box is displayed (before throwing a exception) whenever a error
occurs. The message box displays the ErrorCode and
ErrorDescription properties
of the current error as well as the previous error. If DebugMode property is set
to False, no message box is displayed, however, ErrorCode and
ErrorDescription
properties still indicate the error and can be checked using
IsError (even if
the exception thrown has been handled).
Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
| Visual Basic |
| Public Class MyClass Public WithEvents objSMS As New mCore.SMS Public Sub ModemConnect() Dim strError As String Try strError = "ERROR " & objSMS.ErrorCode.ToString() & ": " & objSMS.ErrorDescription MsgBox(strError,
MsgBoxStyle.Critical, "mCore Demo") |
| C# |
| class MyClass { public mCore.SMS objSMS = new mCore.SMS(); public static void ModemConnect() { string strError = ""; try { objSMS.DebugMode = true; objSMS.Port = "COM1"; objSMS.BaudRate = mCore.BaudRate.BaudRate_19200; objSMS.DataBits = mCore.DataBits.Eight; objSMS.StopBits = mCore.StopBits.One; objSMS.Parity = mCore.Parity.None; objSMS.FlowControl = mCore.FlowControl.RTS_CTS; objSMS.Connect(); } catch
(mCore.GeneralException e) |
mCore.SMS.ErrorCode Property
mCore.SMS.ErrorDescription Property
mCore.SMS.LogType Property
mCore.SMS.IsError Method