UNPKG

@botonic/plugin-contentful

Version:

## What Does This Plugin Do?

23 lines 690 B
"use strict"; 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