//! Error handling for importing [OpenPGP certificates] as [VOA] verifiers.
//!
//! [OpenPGP certificates]: https://openpgp.dev/book/certificates.html
//! [VOA]: https://uapi-group.org/specifications/specs/file_hierarchy_for_the_verification_of_os_artifacts/

use std::path::PathBuf;

/// The error that can occur when importing verifiers.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// An error occurred while importing a destructured OpenPGP certificate.
    #[error("Destructured import error:\n{0}")]
    DestructuredImport(#[source] crate::import::destructured::error::Error),

    /// A path is not a regular file.
    #[error("The path {path:?} is not a regular file.")]
    PathIsNotAFile {
        /// The path that is not a regular file.
        path: PathBuf,
    },
}
