Subtheme of barrio
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.

1 line
884 B

2 years ago
{"version":3,"file":"tryCatch.js","sourceRoot":"","sources":["../../src/util/tryCatch.ts"],"names":[],"mappings":";AAAA,4BAA4B,eAAe,CAAC,CAAA;AAE5C,IAAI,cAAwB,CAAC;AAE7B;IACE,IAAI,CAAC;QACH,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC/C,CAAE;IAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,yBAAW,CAAC,CAAC,GAAG,CAAC,CAAC;QAClB,MAAM,CAAC,yBAAW,CAAC;IACrB,CAAC;AACH,CAAC;AAED,kBAA6C,EAAK;IAChD,cAAc,GAAG,EAAE,CAAC;IACpB,MAAM,CAAM,UAAU,CAAC;AACzB,CAAC;AAHe,gBAAQ,WAGvB,CAAA;AAAA,CAAC","sourcesContent":["import { errorObject } from './errorObject';\n\nlet tryCatchTarget: Function;\n\nfunction tryCatcher(this: any): any {\n try {\n return tryCatchTarget.apply(this, arguments);\n } catch (e) {\n errorObject.e = e;\n return errorObject;\n }\n}\n\nexport function tryCatch<T extends Function>(fn: T): T {\n tryCatchTarget = fn;\n return <any>tryCatcher;\n};\n"]}