Serial.LastErrorCode
From Xojo Documentation
This item was deprecated in version 2019r2. Please use Serial.Error as a replacement. |
Property (As Integer )
This property is only available on macOS and Windows platforms. For cross-platform compatibility, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this property on an incompatible platform. |
aSerial.LastErrorCode = newIntegerValue
or
IntegerValue = aSerial.LastErrorCode
New in 5.5
Supported for all project types and targets.
or
IntegerValue = aSerial.LastErrorCode
New in 5.5
Supported for all project types and targets.
Contains the last known error in the Serial control.
Notes
Error class constants are as follows:
The following class constants can be used to test the LastErrorCode value.
Class Constant | Value | Description |
---|---|---|
NoError | 0 | No error code. |
AccessDenied | 100 | Access denied. |
PortNotFound | 101 | Port not found. |
InvalidOptions | 102 | Invalid options. |
BreakCondition | 103 | Hardware detected a break condition. Usually due to a signal rate mismatch. |
FramingError | 104 | Hardware detected a framing error. Occurs when the designated "start" and "stop" bits are not valid. |
LastErrorCode can be set as well as read. This is useful for subclassing a Serial.
Introduced 2006r2
Other Error Codes
There are many other platform-specific error codes that vary based on the operating system and version. Here are some links for further information:
- Windows XP: http://support.microsoft.com/kb/310123
- Windows Vista: http://technet.microsoft.com/en-us/library/cc771355(v=ws.10).aspx
- Linux: http://www.finalcog.com/c-error-codes-include-errno
- Linux: http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html
- macOS: http://osstatus.com/