MCPcopy
hub / github.com/cloudflare/capnweb / throwRich

Method throwRich

__tests__/index.test.ts:984–990  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

982 it("preserves own properties on thrown errors over RPC", async () => {
983 class RichTarget extends RpcTarget {
984 throwRich() {
985 let err = new RangeError("rich") as any;
986 err.code = "E_RICH";
987 err.details = { reason: "because", count: 7 };
988 err.when = new Date(1234);
989 throw err;
990 }
991 }
992 await using harness = new TestHarness(new RichTarget());
993 let stub = harness.stub as any;

Callers 1

index.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected