work.suroh.tk/node_modules/rxjs/_esm2015/util/tryCatch.js

17 lines
357 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
import { errorObject } from './errorObject';
let tryCatchTarget;
function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
}
catch (e) {
errorObject.e = e;
return errorObject;
}
}
export function tryCatch(fn) {
tryCatchTarget = fn;
return tryCatcher;
}
;
//# sourceMappingURL=tryCatch.js.map