typegpu
Version:
A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.
13 lines (12 loc) • 397 B
JavaScript
import { getName } from "./shared/meta.js";
/**
* @category Errors
*/
export class NotStorageError extends Error {
constructor(value) {
super(`Resource '${getName(value) ?? '<unnamed>'}' cannot be bound as 'storage'. Use .$usage('storage') to allow it.`);
// Set the prototype explicitly.
Object.setPrototypeOf(this, NotStorageError.prototype);
}
}
// #endregion