Serial.LastErrorCode

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Integer )


aSerial.LastErrorCode = newIntegerValue
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: