You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.4 KiB
1 lines
1.4 KiB
{"ast":null,"code":"import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function catchError(selector) {\n return function catchErrorOperatorFunction(source) {\n const operator = new CatchOperator(selector);\n const caught = source.lift(operator);\n return operator.caught = caught;\n };\n}\n\nclass CatchOperator {\n constructor(selector) {\n this.selector = selector;\n }\n\n call(subscriber, source) {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n }\n\n}\n\nclass CatchSubscriber extends SimpleOuterSubscriber {\n constructor(destination, selector, caught) {\n super(destination);\n this.selector = selector;\n this.caught = caught;\n }\n\n error(err) {\n if (!this.isStopped) {\n let result;\n\n try {\n result = this.selector(err, this.caught);\n } catch (err2) {\n super.error(err2);\n return;\n }\n\n this._unsubscribeAndRecycle();\n\n const innerSubscriber = new SimpleInnerSubscriber(this);\n this.add(innerSubscriber);\n const innerSubscription = innerSubscribe(result, innerSubscriber);\n\n if (innerSubscription !== innerSubscriber) {\n this.add(innerSubscription);\n }\n }\n }\n\n} //# sourceMappingURL=catchError.js.map","map":null,"metadata":{},"sourceType":"module"}
|