mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2024-12-27 05:15:25 +00:00
17 lines
357 B
JavaScript
17 lines
357 B
JavaScript
import { errorObject } from './errorObject';
|
|
let tryCatchTarget;
|
|
function tryCatcher() {
|
|
try {
|
|
return tryCatchTarget.apply(this, arguments);
|
|
}
|
|
catch (e) {
|
|
errorObject.e = e;
|
|
return errorObject;
|
|
}
|
|
}
|
|
export function tryCatch(fn) {
|
|
tryCatchTarget = fn;
|
|
return tryCatcher;
|
|
}
|
|
;
|
|
//# sourceMappingURL=tryCatch.js.map
|