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::GpuError Struct Reference

An explicit error result from a donner::gpu operation, carrying the error category and a human-readable message that names the offending field or state so a failing test localizes the bug without a rerun. More...

#include "donner/gpu/GpuError.h"

Public Member Functions

std::string toString () const
 Formats this error as <type>: <message>.
bool operator== (const GpuError &other) const =default
 Equality operator.

Static Public Member Functions

static std::string_view TypeToString (GpuErrorType type)
 Returns the name of an error type, e.g.

Public Attributes

GpuErrorType type = GpuErrorType::InvalidDescriptor
 Error category.
std::string message
 Human-readable failure reason.

Friends

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

Detailed Description

An explicit error result from a donner::gpu operation, carrying the error category and a human-readable message that names the offending field or state so a failing test localizes the bug without a rerun.

Member Function Documentation

◆ operator==()

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

Equality operator.

Parameters
otherError to compare against.

◆ TypeToString()

std::string_view donner::gpu::GpuError::TypeToString ( GpuErrorType type)
static

Returns the name of an error type, e.g.

"InvalidDescriptor".

Parameters
typeError type to format.

◆ operator<<

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

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

Parameters
osOutput stream.
errorError to output.

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