1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use thiserror::Error;

#[derive(Error, Debug)]
pub enum PluginError {
    #[error("{0}")]
    Message(String),

    #[error("Unable to install {tool}, unsupported architecture {arch}.")]
    UnsupportedArch { tool: String, arch: String },

    #[error("{tool} does not support canary/nightly versions.")]
    UnsupportedCanary { tool: String },

    #[error("Unable to install {tool}, unsupported OS {os}.")]
    UnsupportedOS { tool: String, os: String },

    #[error("Unable to install {tool}, unsupported architecture {arch} for {os}.")]
    UnsupportedTarget {
        tool: String,
        arch: String,
        os: String,
    },
}