From 486cb18fc54b408d40a02415e48e0cfb6cb196ed Mon Sep 17 00:00:00 2001 From: Ian Bull Date: Thu, 19 Sep 2024 00:14:54 -0700 Subject: refactor(ext/webgpu): align error messages (#25719) Aligns the error messages in the ext/webgpu folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269 --- ext/webgpu/02_surface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/webgpu/02_surface.js') diff --git a/ext/webgpu/02_surface.js b/ext/webgpu/02_surface.js index f35f745af..c48787dbf 100644 --- a/ext/webgpu/02_surface.js +++ b/ext/webgpu/02_surface.js @@ -92,7 +92,7 @@ class GPUCanvasContext { "Failed to execute 'getCurrentTexture' on 'GPUCanvasContext'"; if (this[_configuration] === null) { - throw new DOMException("context is not configured.", "InvalidStateError"); + throw new DOMException("Context is not configured", "InvalidStateError"); } const { createGPUTexture, assertDevice } = loadWebGPU(); @@ -179,7 +179,7 @@ class UnsafeWindowSurface { getContext(context) { if (context !== "webgpu") { - throw new TypeError("Only 'webgpu' context is supported."); + throw new TypeError("Only 'webgpu' context is supported"); } this.#ctx = createCanvasContext({ surfaceRid: this.#surfaceRid }); return this.#ctx; -- cgit v1.2.3