Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::gpu::shader::ShaderError Struct Reference

An error from IR construction, validation, or layout computation. More...

#include "donner/gpu/shader/ShaderError.h"

Public Member Functions

bool operator== (const ShaderError &other) const =default
 Equality operator.

Public Attributes

std::string message
 Human-readable failure reason.
RcString nodeLabel
 Label of the node or rule that failed.

Friends

std::ostream & operator<< (std::ostream &os, const ShaderError &error)
 Ostream output operator, outputs <label>: <message>.

Detailed Description

An error from IR construction, validation, or layout computation.

The IR builder is fail-closed: ill-typed construction returns a ShaderError, never asserts on input. Messages name the offending operand or rule; nodeLabel carries a caller-supplied source-location-like label (or the node kind when the caller did not supply one) so failures localize without a rerun.

This type is intentionally local to the shader IR rather than reusing donner::gpu::GpuError: the runtime's error taxonomy describes device/resource failures (handles, descriptors, limits), not type-checking diagnostics, and the IR does not depend on runtime headers.

Member Function Documentation

◆ operator==()

bool donner::gpu::shader::ShaderError::operator== ( const ShaderError & other) const
default

Equality operator.

Parameters
otherError to compare against.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const ShaderError & error )
friend

Ostream output operator, outputs <label>: <message>.

Parameters
osOutput stream.
errorError to output.

The documentation for this struct was generated from the following file: