summaryrefslogtreecommitdiff
path: root/ext/webgpu/02_surface.js
diff options
context:
space:
mode:
authorIan Bull <irbull@eclipsesource.com>2024-09-19 00:14:54 -0700
committerGitHub <noreply@github.com>2024-09-19 09:14:54 +0200
commit486cb18fc54b408d40a02415e48e0cfb6cb196ed (patch)
treedbe9e98a7d6edd3d1a464a229d6cee68e19e307e /ext/webgpu/02_surface.js
parentf460188e583f00144000aa0d8ade08218d47c3c1 (diff)
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
Diffstat (limited to 'ext/webgpu/02_surface.js')
-rw-r--r--ext/webgpu/02_surface.js4
1 files changed, 2 insertions, 2 deletions
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;