فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("WebGPU API")}}{{SecureContext_Header}}{{AvailableInWorkers}}

The **GPUError** interface of the {{domxref("WebGPU API", "WebGPU API", "", "nocode")}} is the base interface for errors surfaced by {{domxref("GPUDevice.popErrorScope")}} and the {{domxref("GPUDevice.uncapturederror_event", "uncapturederror")}} event.

{{InheritanceDiagram}}

Instance properties

  • {{domxref("GPUError.message", "message")}} {{ReadOnlyInline}}
  • : A string providing a human-readable message that explains why the error occurred.

Examples

For usage examples of error objects based on GPUError, see:

  • [GPUDevice.popErrorScope](/en-US/docs/Web/API/GPUDevice/popErrorScope#examples)
  • [The GPUDevice uncapturederror event](/en-US/docs/Web/API/GPUDevice/uncapturederror_event#examples)
  • {{domxref("GPUInternalError")}}, {{domxref("GPUOutOfMemoryError")}}, and {{domxref("GPUValidationError")}}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • The WebGPU API
  • WebGPU Error Handling best practices