runUnaryGuarded<T> method

void runUnaryGuarded<T>(
  1. void action(
    1. T
    ),
  2. T argument
)

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

See runGuarded.

Implementation

void runUnaryGuarded<T>(void Function(T) action, T argument) {
  try {
    return _runUnaryZoned<void, T>(this, action, argument);
  } catch (e, s) {
    _handleUncaughtErrorZoned(this, e, s);
  }
}