UNPKG

@biomejs/js-api

Version:

JavaScript APIs for the Biome package

26 lines 587 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tryCatchWrapper = tryCatchWrapper; /** * The error generated when communicating with WebAssembly */ class WasmError extends Error { constructor(stackTrace) { super(); this.stackTrace = stackTrace; } } /** * Catch a WebAssembly error and wrap into a native JS Error * * @param func The function to execute */ function tryCatchWrapper(func) { try { return func(); } catch (err) { throw new WasmError(err); } } //# sourceMappingURL=wasm.js.map