Readable.ReadError

From Xojo Documentation

Method

Readable.ReadError() As Boolean

Supported for all project types and targets.

Returns True if an error of any type occurred.

Sample Code

This If statement checks for an error after attempting to read from the BinaryStream and displays the error code if ReadError returns True.

Dim readStream As BinaryStream = BinaryStream.Open(readFile, False)
readStream.LittleEndian = True
.
.
If ReadStream.ReadError Then
MsgBox(Str(readStream.LastErrorCode))
End If