2accf7882f571d9a6b8cee6316c7f45687ee5b1fefb6ef9f736c8aba3ba0a55df627debd106d7d5ea1926c410942e429e384ba7b568a510bbf845ef7556c96 442 B

1234567891011121314151617181920
  1. import { errorObject } from './errorObject';
  2. let tryCatchTarget;
  3. function tryCatcher() {
  4. errorObject.e = undefined;
  5. try {
  6. return tryCatchTarget.apply(this, arguments);
  7. }
  8. catch (e) {
  9. errorObject.e = e;
  10. return errorObject;
  11. }
  12. finally {
  13. tryCatchTarget = undefined;
  14. }
  15. }
  16. export function tryCatch(fn) {
  17. tryCatchTarget = fn;
  18. return tryCatcher;
  19. }
  20. //# sourceMappingURL=tryCatch.js.map