diff --git a/crates/binstalk-downloader/src/download.rs b/crates/binstalk-downloader/src/download.rs index 2d491239..10de2348 100644 --- a/crates/binstalk-downloader/src/download.rs +++ b/crates/binstalk-downloader/src/download.rs @@ -27,17 +27,17 @@ mod utils; #[derive(Debug, ThisError)] pub enum DownloadError { - #[error(transparent)] + #[error("Failed to extract zipfile: {0}")] Unzip(#[from] ZipError), - #[error(transparent)] + #[error("Failed to download from remote: {0}")] Remote(#[from] RemoteError), /// A generic I/O error. /// /// - Code: `binstall::io` /// - Exit: 74 - #[error(transparent)] + #[error("I/O Error: {0}")] Io(io::Error), } diff --git a/crates/binstalk-downloader/src/remote.rs b/crates/binstalk-downloader/src/remote.rs index 56eb42b3..5f2ea6d0 100644 --- a/crates/binstalk-downloader/src/remote.rs +++ b/crates/binstalk-downloader/src/remote.rs @@ -28,7 +28,7 @@ const DEFAULT_MIN_TLS: tls::Version = tls::Version::TLS_1_2; #[derive(Debug, ThisError)] pub enum Error { - #[error(transparent)] + #[error("Reqwest error: {0}")] Reqwest(#[from] reqwest::Error), #[error(transparent)] diff --git a/crates/binstalk-manifests/src/binstall_crates_v1.rs b/crates/binstalk-manifests/src/binstall_crates_v1.rs index 10393211..e0234f77 100644 --- a/crates/binstalk-manifests/src/binstall_crates_v1.rs +++ b/crates/binstalk-manifests/src/binstall_crates_v1.rs @@ -31,10 +31,10 @@ const BUFFER_SIZE: usize = 4096 * 5; #[derive(Debug, Diagnostic, Error)] #[non_exhaustive] pub enum Error { - #[error(transparent)] + #[error("I/O Error: {0}")] Io(#[from] io::Error), - #[error(transparent)] + #[error("Failed to parse json: {0}")] SerdeJsonParse(#[from] serde_json::Error), } diff --git a/crates/binstalk-manifests/src/cargo_crates_v1.rs b/crates/binstalk-manifests/src/cargo_crates_v1.rs index e5fb6c85..5cffb4e0 100644 --- a/crates/binstalk-manifests/src/cargo_crates_v1.rs +++ b/crates/binstalk-manifests/src/cargo_crates_v1.rs @@ -181,13 +181,13 @@ impl CratesToml<'_> { #[derive(Debug, Diagnostic, Error)] #[non_exhaustive] pub enum CratesTomlParseError { - #[error(transparent)] + #[error("I/O Error: {0}")] Io(#[from] io::Error), - #[error(transparent)] + #[error("Failed to deserialize toml: {0}")] TomlParse(Box), - #[error(transparent)] + #[error("Failed to serialie toml: {0}")] TomlWrite(Box), #[error(transparent)] diff --git a/crates/binstalk-manifests/src/cargo_crates_v1/crate_version_source.rs b/crates/binstalk-manifests/src/cargo_crates_v1/crate_version_source.rs index 313532e0..389bed2a 100644 --- a/crates/binstalk-manifests/src/cargo_crates_v1/crate_version_source.rs +++ b/crates/binstalk-manifests/src/cargo_crates_v1/crate_version_source.rs @@ -98,10 +98,10 @@ impl FromStr for CrateVersionSource { #[derive(Debug, Diagnostic, Error)] #[non_exhaustive] pub enum CvsParseError { - #[error(transparent)] + #[error("Failed to parse url in cvs: {0}")] UrlParse(#[from] url::ParseError), - #[error(transparent)] + #[error("Failed to parse version in cvs: {0}")] VersionParse(#[from] semver::Error), #[error("unknown source type {kind}+{arg}")] diff --git a/crates/binstalk/src/errors.rs b/crates/binstalk/src/errors.rs index c833bdaf..5bf297ce 100644 --- a/crates/binstalk/src/errors.rs +++ b/crates/binstalk/src/errors.rs @@ -79,7 +79,7 @@ pub enum BinstallError { /// /// - Code: `binstall::url_parse` /// - Exit: 65 - #[error(transparent)] + #[error("Failed to parse url: {0}")] #[diagnostic(severity(error), code(binstall::url_parse))] UrlParse(#[from] url::ParseError), @@ -87,7 +87,7 @@ pub enum BinstallError { /// /// - Code: `binstall::unzip` /// - Exit: 66 - #[error(transparent)] + #[error("Failed to extract zipfile: {0}")] #[diagnostic(severity(error), code(binstall::unzip))] Unzip(#[from] ZipError), @@ -95,7 +95,7 @@ pub enum BinstallError { /// /// - Code: `binstall::template` /// - Exit: 67 - #[error(transparent)] + #[error("Failed to render template: {0}")] #[diagnostic(severity(error), code(binstall::template))] Template(Box), @@ -105,7 +105,7 @@ pub enum BinstallError { /// /// - Code: `binstall::reqwest` /// - Exit: 68 - #[error(transparent)] + #[error("Reqwest error: {0}")] #[diagnostic(severity(error), code(binstall::reqwest))] Reqwest(#[from] ReqwestError), @@ -137,7 +137,7 @@ pub enum BinstallError { /// /// - Code: `binstall::io` /// - Exit: 74 - #[error(transparent)] + #[error("I/O Error: {0}")] #[diagnostic(severity(error), code(binstall::io))] Io(io::Error), @@ -171,7 +171,7 @@ pub enum BinstallError { /// /// - Code: `binstall::cargo_manifest` /// - Exit: 78 - #[error(transparent)] + #[error("Failed to parse cargo manifest: {0}")] #[diagnostic( severity(error), code(binstall::cargo_manifest),