The IsError method returns true if there was any error during the last method
call or property read/write (i.e. if ErrorCode returned a non-zero value).
Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
| Name | Description |
| IsError () | Returns True if there was a error during last method call or last get/set of any property. |
| IsError (ShowMsgBox As Boolean) | Returns True if there was a error during last method call or last get/set of any property and displays a MsgBox about the error. |
| IsError (ShowMsgBox As Boolean, MsgBoxTitle As String) | Returns True if there was a error during last method call or last get/set of any property and displays a MsgBox about the error and allows you to specify the MsgBox title string. |
| 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) |