Dart API Reference
dart:io
OSError
OSError
class
An
OSError
object holds information about an error from the operating system.
An
OSError
object holds information about an error from the operating system.
Constructors
OSError
( [
String
message
=
""
,
int
errorCode
=
noErrorCode
] )
const
Creates an OSError object from a message and an errorCode.
Constants
noErrorCode
=
-1
Constant used to indicate that no OS error code is available.
Instance Properties
message
String
read-only
Error message supplied by the operating system. null if no message is associated with the error.
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.
Instance Methods
toString
( ) →
String
Converts an OSError object to a string representation.