use serde_json::Value;
#[derive(thiserror::Error, Debug, Clone)]
#[error("Interrupt: {0}")]
pub struct InterruptError(pub Value);
impl InterruptError {
pub fn new(value: impl Into<Value>) -> Self {
Self(value.into())
}
pub fn value(&self) -> &Value {
&self.0
}
pub fn into_graph_error(self) -> crate::graph::error::GraphError {
crate::graph::error::GraphError::InterruptError(self)
}
}