wasmrs-js
Version:
A JavaScript implementation of the RSocket protocol over WebAssembly.
21 lines • 737 B
JavaScript
class TestableError extends Error {
matcher() {
return new RegExp(this.toString().replace(/^Error: /, ''));
}
}
export class HostCallNotImplementedError extends TestableError {
constructor(binding, namespace, operation) {
super(`Host call not implemented. Guest called host with binding = '${binding}', namespace = '${namespace}', & operation = '${operation}'`);
}
}
export class InvalidWasm extends TestableError {
constructor(error) {
super(`Invalid wasm binary: ${error.message}`);
}
}
export class StreamingFailure extends TestableError {
constructor(error) {
super(`Could not instantiate from Response object: ${error.message}`);
}
}
//# sourceMappingURL=errors.js.map