// internal static void _addErrorWithReplacement <T>(_EventSink <T> sink, Exception error, string stackTrace) { AsyncError replacement = Zone.current.errorCallback(error); if (replacement != null) { error = async_._nonNullError(replacement); stackTrace = replacement.StackTrace; } sink._addError(error, stackTrace); }
internal override void _handleError(object error, _EventSink <T> sink) { bool matches = true; if (_test != null) { try { matches = _test((Exception)error); } catch (Exception e) { _stream._addErrorWithReplacement(sink, e, e.StackTrace); return; } } string stackTrace = error is Exception ? ((Exception)error).StackTrace : ""; if (matches) { try { _async._invokeErrorHandler(_transform, error, stackTrace); } catch (Exception e) { if (Equals(e, error)) { sink._addError(error, stackTrace); } else { _stream._addErrorWithReplacement(sink, e, e.StackTrace); } return; } } else { sink._addError(error, stackTrace); } }
public override void addError(object error, string stackTrace) { _sink._addError(error, stackTrace ?? AsyncError.defaultStackTrace(error)); }
internal virtual void _handleError(object error, _EventSink <T> sink) { string stackTrace = error is Exception ? ((Exception)error).StackTrace : ""; sink._addError(error, stackTrace); }