Ohm-Management - Projektarbeit B-ME
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.

tryCatch.js 356B

12345678910111213141516
  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. //# sourceMappingURL=tryCatch.js.map