@botonic/plugin-contentful
Version:
Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet
23 lines • 690 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.rethrowDecorator = exports.isError = void 0;
const tslib_1 = require("tslib");
function isError(e) {
const exception = e;
return !!exception.name && !!exception.message;
}
exports.isError = isError;
function rethrowDecorator(func, beforeRethrow) {
const f = (...args) => tslib_1.__awaiter(this, void 0, void 0, function* () {
try {
return yield func(...args);
}
catch (e) {
yield beforeRethrow(e, ...args);
throw e;
}
});
return f;
}
exports.rethrowDecorator = rethrowDecorator;
//# sourceMappingURL=exceptions.js.map