MCPcopy Index your code
hub / github.com/dawn-gpu/node-webgpu / withErrorScope

Function withErrorScope

test/tests/basic-tests.js:30–37  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

28 })
29
30 function withErrorScope(fn) {
31 return async () => {
32 device.pushErrorScope('validation');
33 await fn();
34 const error = await device.popErrorScope();
35 assert(!error, `device error: ${error?.message || error}`);
36 };
37 }
38
39 await it('creates a device', withErrorScope(async () => {
40 console.log('adapter.info.description:', adapter.info.description);

Callers 1

basic-tests.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected