-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nicholaslyang
authored and
nicholaslyang
committed
Oct 23, 2023
1 parent
338cdb7
commit 9c5fa5b
Showing
19 changed files
with
263 additions
and
157 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use std::{backtrace, io}; | ||
|
||
use thiserror::Error; | ||
use turbopath::AbsoluteSystemPathBuf; | ||
|
||
use crate::{ | ||
commands::{bin, prune}, | ||
daemon::DaemonError, | ||
rewrite_json::RewriteError, | ||
}; | ||
|
||
#[derive(Debug, Error)] | ||
pub enum Error { | ||
#[error("No command specified")] | ||
NoCommand(#[backtrace] backtrace::Backtrace), | ||
#[error("{0}")] | ||
Bin(#[from] bin::Error, #[backtrace] backtrace::Backtrace), | ||
#[error(transparent)] | ||
Path(#[from] turbopath::PathError), | ||
#[error("at least one task must be specified")] | ||
NoTasks(#[backtrace] backtrace::Backtrace), | ||
#[error(transparent)] | ||
Config(#[from] crate::config::Error), | ||
#[error(transparent)] | ||
ChromeTracing(#[from] crate::tracing::Error), | ||
#[error("Encountered an IO error while attempting to read {config_path}: {error}")] | ||
FailedToReadConfig { | ||
config_path: AbsoluteSystemPathBuf, | ||
error: io::Error, | ||
}, | ||
#[error("Encountered an IO error while attempting to set {config_path}: {error}")] | ||
FailedToSetConfig { | ||
config_path: AbsoluteSystemPathBuf, | ||
error: io::Error, | ||
}, | ||
#[error(transparent)] | ||
Rewrite(#[from] RewriteError), | ||
#[error(transparent)] | ||
Auth(#[from] turborepo_auth::Error), | ||
#[error(transparent)] | ||
Daemon(#[from] DaemonError), | ||
#[error(transparent)] | ||
Prune(#[from] prune::Error), | ||
// Temporary to prevent having to move all of the errors from anyhow to thiserror at once. | ||
#[error(transparent)] | ||
Anyhow(#[from] anyhow::Error), | ||
} |
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.