W3cubDocs

/Dart 2

runGuarded method

void runGuarded (void action())

Executes the given action in this zone and catches synchronous errors.

This function is equivalent to:

try {
  this.run(action);
} catch (e, s) {
  this.handleUncaughtError(e, s);
}

See run.

Implementation

void runGuarded(void action());

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-async/Zone/runGuarded.html