dynamic runGuarded(dynamic action())

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

This function is equivalent to:

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

See run.

Source

/*=R*/ runGuarded/*<R>*/(/*=R*/ action());