Skip to content

Commit

Permalink
docs(catch): include marble diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
jayphelps authored Jan 27, 2017
1 parent 8348549 commit d6b7967
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/operator/catch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { subscribeToResult } from '../util/subscribeToResult';
/**
* Catches errors on the observable to be handled by returning a new observable or throwing an error.
*
* <img src="./img/catch.png" width="100%">
*
* @example <caption>Continues with a different Observable when there's an error</caption>
*
* Observable.of(1, 2, 3, 4, 5)
Expand All @@ -18,7 +20,8 @@ import { subscribeToResult } from '../util/subscribeToResult';
* return n;
* })
* .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V'))
* .subscribe(x => console.log(x)); // -> 1, 2, 3, I, II, III, IV, V
* .subscribe(x => console.log(x));
* // 1, 2, 3, I, II, III, IV, V
*
* @example <caption>Retries the caught source Observable again in case of error, similar to retry() operator</caption>
*
Expand Down

0 comments on commit d6b7967

Please sign in to comment.