@botonic/plugin-contentful
Version:
## What Does This Plugin Do?
18 lines • 495 B
JavaScript
import { __awaiter } from "tslib";
export function isError(e) {
const exception = e;
return !!exception.name && !!exception.message;
}
export function rethrowDecorator(func, beforeRethrow) {
const f = (...args) => __awaiter(this, void 0, void 0, function* () {
try {
return yield func(...args);
}
catch (e) {
yield beforeRethrow(e, ...args);
throw e;
}
});
return f;
}
//# sourceMappingURL=exceptions.js.map