-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
6 changed files
with
135 additions
and
56 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,7 +1,21 @@ | ||
#[derive(Debug, thiserror::Error)] | ||
use std::path::PathBuf; | ||
|
||
use thiserror::Error; | ||
|
||
#[derive(Debug, PartialEq, Error)] | ||
pub enum RopsCliError { | ||
#[error("multiple inputs; recieved content from stdin when a file path was provided")] | ||
MultipleInputs, | ||
#[error("missing input; neither a file path nor stdin were provided")] | ||
MissingInput, | ||
#[error("unable to determine input format; {0}")] | ||
UndeterminedFormat(#[from] UndeterminedFormatError), | ||
} | ||
|
||
#[derive(Debug, PartialEq, Error)] | ||
pub enum UndeterminedFormatError { | ||
#[error("found neither format nor file arguments")] | ||
FoundNeither, | ||
#[error("unable to determine file extension for {0} when no format argument was found")] | ||
NoFileExtention(PathBuf), | ||
} |
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