doOnError method

Observable<T> doOnError (Function onError)

Invokes the given callback function when the stream emits an error.

Example

new Observable.error(new Exception())
  .doOnError((error, stacktrace) => print("oh no"))
  .listen(null); // prints "Oh no"

Implementation

Observable<T> doOnError(Function onError) =>
    transform(new DoStreamTransformer<T>(onError: onError));