-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* style: Remove emojis * docs: Update changelog
- Loading branch information
1 parent
80205ed
commit 75f8932
Showing
10 changed files
with
64 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,72 @@ | ||
//! Custom error implementations. | ||
|
||
use crate::emoji; | ||
|
||
#[derive(Debug, miette::Diagnostic, thiserror::Error)] | ||
pub enum Error { | ||
#[diagnostic(code(espup::toolchain::create_directory))] | ||
#[error("{} Creating directory '{0}' failed", emoji::ERROR)] | ||
#[error("Creating directory '{0}' failed")] | ||
CreateDirectory(String), | ||
|
||
#[diagnostic(code(espup::toolchain::rust::query_github))] | ||
#[error("{} Failed to query GitHub API", emoji::ERROR)] | ||
#[error("Failed to query GitHub API")] | ||
GithubQuery, | ||
|
||
#[diagnostic(code(espup::toolchain::rust::install_riscv_target))] | ||
#[error( | ||
"{} Failed to Install RISC-V targets for '{0}' toolchain", | ||
emoji::ERROR | ||
)] | ||
#[error("Failed to Install RISC-V targets for '{0}' toolchain")] | ||
InstallRiscvTarget(String), | ||
|
||
#[diagnostic(code(espup::ivalid_destination))] | ||
#[error( | ||
"{} Invalid export file destination: '{0}'. Please, use an absolute or releative path (including the file and its extension)", | ||
emoji::ERROR | ||
)] | ||
"Invalid export file destination: '{0}'. Please, use an absolute or releative path (including the file and its extension)")] | ||
InvalidDestination(String), | ||
|
||
#[diagnostic(code(espup::toolchain::rust::invalid_version))] | ||
#[error( | ||
"{} Invalid toolchain version '{0}'. Verify that the format is correct: '<major>.<minor>.<patch>.<subpatch>' or '<major>.<minor>.<patch>', and that the release exists in https://github.com/esp-rs/rust-build/releases", | ||
emoji::ERROR | ||
)] | ||
"Invalid toolchain version '{0}'. Verify that the format is correct: '<major>.<minor>.<patch>.<subpatch>' or '<major>.<minor>.<patch>', and that the release exists in https://github.com/esp-rs/rust-build/releases")] | ||
InvalidVersion(String), | ||
|
||
#[error(transparent)] | ||
IoError(#[from] std::io::Error), | ||
|
||
#[diagnostic(code(espup::toolchain::rust::missing_rust))] | ||
#[error( | ||
"{} Rust is not installed. Please, install Rust via rustup: https://rustup.rs/", | ||
emoji::ERROR | ||
)] | ||
#[error("Rust is not installed. Please, install Rust via rustup: https://rustup.rs/")] | ||
MissingRust, | ||
|
||
#[diagnostic(code(espup::remove_directory))] | ||
#[error("{} Failed to remove '{0}'", emoji::ERROR)] | ||
#[error("Failed to remove '{0}'")] | ||
RemoveDirectory(String), | ||
|
||
#[error(transparent)] | ||
RewquestError(#[from] reqwest::Error), | ||
|
||
#[diagnostic(code(espup::toolchain::rust::rustup_detection_error))] | ||
#[error("{} Error detecting rustup: {0}", emoji::ERROR)] | ||
#[error("Error detecting rustup: {0}")] | ||
RustupDetection(String), | ||
|
||
#[diagnostic(code(espup::toolchain::rust::serialize_json))] | ||
#[error("{} Failed to serialize json from string", emoji::ERROR)] | ||
#[error("Failed to serialize json from string")] | ||
SerializeJson, | ||
|
||
#[diagnostic(code(espup::toolchain::rust::uninstall_riscv_target))] | ||
#[error("{} Failed to uninstall RISC-V target", emoji::ERROR)] | ||
#[error("Failed to uninstall RISC-V target")] | ||
UninstallRiscvTarget, | ||
|
||
#[diagnostic(code(espup::toolchain::unsupported_file_extension))] | ||
#[error("{} Unsuported file extension: '{0}'", emoji::ERROR)] | ||
#[error("Unsuported file extension: '{0}'")] | ||
UnsuportedFileExtension(String), | ||
|
||
#[diagnostic(code(espup::host_triple::unsupported_host_triple))] | ||
#[error("{} Host triple '{0}' is not supported", emoji::ERROR)] | ||
#[error("Host triple '{0}' is not supported")] | ||
UnsupportedHostTriple(String), | ||
|
||
#[diagnostic(code(espup::targets::unsupported_target))] | ||
#[error("{} Target '{0}' is not supported", emoji::ERROR)] | ||
#[error("Target '{0}' is not supported")] | ||
UnsupportedTarget(String), | ||
|
||
#[diagnostic(code(espup::toolchain::rust::rust))] | ||
#[error("{} Failed to install 'rust' component of Xtensa Rust", emoji::ERROR)] | ||
#[error("Failed to install 'rust' component of Xtensa Rust")] | ||
XtensaRust, | ||
|
||
#[diagnostic(code(espup::toolchain::rust::rust_src))] | ||
#[error( | ||
"{} Failed to install 'rust-src' component of Xtensa Rust", | ||
emoji::ERROR | ||
)] | ||
#[error("Failed to install 'rust-src' component of Xtensa Rust")] | ||
XtensaRustSrc, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.