Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/rxjs/operator/ |
Upload File : |
"use strict"; var catchError_1 = require('../operators/catchError'); /** * 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) * .map(n => { * if (n == 4) { * throw 'four!'; * } * return n; * }) * .catch(err => Observable.of('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> * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n === 4) { * throw 'four!'; * } * return n; * }) * .catch((err, caught) => caught) * .take(30) * .subscribe(x => console.log(x)); * // 1, 2, 3, 1, 2, 3, ... * * @example <caption>Throws a new error when the source Observable throws an error</caption> * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n == 4) { * throw 'four!'; * } * return n; * }) * .catch(err => { * throw 'error in source. Details: ' + err; * }) * .subscribe( * x => console.log(x), * err => console.log(err) * ); * // 1, 2, 3, error in source. Details: four! * * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable * is returned by the `selector` will be used to continue the observable chain. * @return {Observable} An observable that originates from either the source or the observable returned by the * catch `selector` function. * @method catch * @name catch * @owner Observable */ function _catch(selector) { return catchError_1.catchError(selector)(this); } exports._catch = _catch; //# sourceMappingURL=catch.js.map