Front end of the Slack clone application.

tryCatch.js 357B

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