// …
device.addEventListener("uncapturederror", (event) => {
// Re-surface the error
console.error("A WebGPU error was not captured:", event.error.message);
reportErrorToServer({
type: event.error.constructor.name,
message: event.error.message,
});
});
// …GPUUncapturedErrorEvent / notebook
GPUUncapturedErrorEvent
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.