-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #857 from googlefonts/errors-3
[fontc] Tweak root error type
- Loading branch information
Showing
7 changed files
with
79 additions
and
73 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,27 +1,34 @@ | ||
use std::{io, path::PathBuf}; | ||
|
||
use fontbe::orchestration::AnyWorkId; | ||
use fontir::error::TrackFileError; | ||
use thiserror::Error; | ||
|
||
#[derive(Debug, Error)] | ||
pub enum Error { | ||
#[error("'{0}' exists but is not a directory")] | ||
ExpectedDirectory(PathBuf), | ||
#[error("io failed for '{path}': '{source}'")] | ||
FileIo { | ||
path: PathBuf, | ||
#[source] | ||
source: io::Error, | ||
}, | ||
#[error("failed to write to stdout or stderr: '{0}'")] | ||
StdioWriteFail(#[source] io::Error), | ||
#[error("Unrecognized source {0}")] | ||
UnrecognizedSource(PathBuf), | ||
#[error("yaml error: '{0}'")] | ||
#[error(transparent)] | ||
YamlSerError(#[from] serde_yaml::Error), | ||
#[error("IO error: '{0}'")] | ||
IoError(#[from] io::Error), | ||
#[error(transparent)] | ||
TrackFile(#[from] TrackFileError), | ||
#[error("Font IR error: '{0}'")] | ||
FontIrError(#[from] fontir::error::Error), | ||
#[error("Unable to produce IR")] | ||
IrGenerationError, | ||
#[error(transparent)] | ||
Backend(#[from] fontbe::error::Error), | ||
#[error("Missing file '{0}'")] | ||
FileExpected(PathBuf), | ||
#[error("Tasks failed: {0:?}")] | ||
TasksFailed(Vec<(AnyWorkId, String)>), | ||
#[error("Unable to proceed; {0} jobs stuck pending")] | ||
UnableToProceed(usize), | ||
#[error("A task panicked: '{0}'")] | ||
Panic(String), | ||
} |
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