An OSError object holds information about an error from the operating system.

Constants

int noErrorCode = -1
const

Constant used to indicate that no OS error code is available.

Properties

errorCode int
read-only

Error code supplied by the operating system. Will have the value noErrorCode if there is no error code associated with the error.

message String
read-only

Error message supplied by the operating system. null if no message is associated with the error.

Constructors

OSError([String message = "", int errorCode = noErrorCode])
const

Creates an OSError object from a message and an errorCode.

Methods

toString() → String

Converts an OSError object to a string representation.