Skip to main content

subdiv_kernels/
error.rs

1use thiserror::Error;
2
3/// Error type returned by kernel APIs.
4#[derive(Debug, Clone, Error, PartialEq, Eq)]
5#[non_exhaustive]
6pub enum KernelError {
7    /// The mesh topology arrays are inconsistent.
8    #[error("invalid topology: {0}")]
9    InvalidTopology(&'static str),
10
11    /// A requested feature is not implemented yet.
12    #[error("not implemented: {0}")]
13    NotImplemented(&'static str),
14
15    /// A GPU (wgpu) operation failed or was misconfigured.
16    #[error("gpu error: {0}")]
17    Gpu(String),
18}