frontend/.pnpm-store/v3/files/15/2accf7882f571d9a6b8cee6316c7f45687ee5b1fefb6ef9f736c8aba3ba0a55df627debd106d7d5ea1926c410942e429e384ba7b568a510bbf845ef7556c96

20 lines
442 B
Plaintext

import { errorObject } from './errorObject';
let 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