catch
Continues an observable sequence that is terminated by an exception with the next observable sequence. There is an alias for this method catchException for browsers <IE9
Arguments
second(Observable): A second observable sequence used to produce results when an error occurred in the first sequence.handler(Function): Exception handler function that returns an observable sequence given the error that occurred in the first sequence
Returns
(Observable): An observable sequence containing the first sequence's elements, followed by the elements of the handler sequence in case an exception occurred.
Example
Using a second observable
Using a handler function
Last updated
Was this helpful?