handleError method

dynamic handleError (
  1. VoidFunc func
)

func Function containing the guarded code to be executed.

Implementation

handleError(VoidFunc func) {
  try {
    func();
  } catch (error, stackTrace) {
    if (!onError(error, stackTrace)) {
      rethrow;
    }
  }
}