wishthis/node_modules/rxjs/_esm5/internal/util/tryCatch.js
2022-01-21 09:28:41 +01:00

21 lines
499 B
JavaScript

/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */
import { errorObject } from './errorObject';
var tryCatchTarget;
function tryCatcher() {
errorObject.e = undefined;
try {
return tryCatchTarget.apply(this, arguments);
}
catch (e) {
errorObject.e = e;
return errorObject;
}
finally {
tryCatchTarget = undefined;
}
}
export function tryCatch(fn) {
tryCatchTarget = fn;
return tryCatcher;
}
//# sourceMappingURL=tryCatch.js.map