Skip to main content

tk_pg_core/
errors.rs

1use crate::Op;
2
3/// Error type for PauliGraph operations and input validation.
4#[derive(Debug, thiserror::Error)]
5pub enum PauliGraphError {
6    /// Invalid operation within a PauliGraph.
7    #[error("Invalid PauliGraph Op: {op:?}, {message}")]
8    InvalidOp {
9        /// The invalid operation.
10        op: Op,
11        /// The error message.
12        message: String,
13    },
14
15    /// Invalid input JSON during deserialization.
16    #[error("Invalid input JSON: {0}")]
17    InvalidInputJson(String),
18}