error property

Object error
final

An unhandled Error or Exception.

In practice it is only necessary to extract message information by using Object.toString, hence the upcast to Object. It is possible to check for specific errors using the is error:

void handleError(UncaughtError e) {
  if (e.error is BackendUnavailableError) {
    // ...
  } else {
    // ...
  }
}

Implementation

final Object error;