argumentation_bipolar/error.rs
1//! Crate error types.
2
3use thiserror::Error;
4
5/// Errors that can occur in the `argumentation-bipolar` crate.
6#[derive(Debug, Error)]
7pub enum Error {
8 /// A framework operation referenced an argument that is not in the
9 /// framework.
10 #[error("argument not found: {0}")]
11 ArgumentNotFound(String),
12
13 /// An edge was added that introduces a self-loop where the semantics
14 /// reject them. Currently applies only to self-support (an argument
15 /// cannot be its own necessary supporter).
16 #[error("illegal self-loop: argument '{0}' cannot support itself")]
17 IllegalSelfSupport(String),
18
19 /// An error from the underlying Dung layer (e.g., framework too
20 /// large for subset enumeration).
21 #[error("dung error: {0}")]
22 Dung(#[from] argumentation::Error),
23}