NSErrorException class final

Wrapper Exception around an Objective-C NSError.

In Dart, an "exception" is an ordinary runtime failure that can be caught and handled, while an "error" is a program failure that the programmer should have avoided (and catching Errors is bad practice).

Objective-C inverts this nomenclature. Ordinary runtime failures are signaled using NSError, so these are analogous to Dart's Exceptions, though they're returned by reference rather than thrown. On the other hand, NSException is intended to be used in an @throw statement, and not intended to be caught (in fact Objective-C doesn't intend throwing and catching to be part of an ordinary control flow at all).

Implemented types

Constructors

NSErrorException(NSError error)

Properties

error NSError
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

checkErrorPointer(ObjectPtr pointer) → void