//! Error type for the dynamic-execution logic.

/// Anything that can go wrong provisioning and testing a soft-PLC. The compliance
/// agent maps this into its own `AgentError` at the call boundary.
#[derive(thiserror::Error, Debug)]
pub enum ExecError {
    /// An HTTP request (to OpenPLC) failed.
    #[error("HTTP error: {0}")]
    Http(#[from] reqwest::Error),
    /// A local IO / process error (e.g. invoking `docker`).
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),
    /// Any other failure, with a message.
    #[error("{0}")]
    Other(String),
}
