-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #466. Closes #465. Closes #447. Closes #443. Closes #346. Closes #219. Closes #539. Closes #522.
- Loading branch information
Showing
294 changed files
with
23,350 additions
and
13,453 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
//! This module defines all the errors that can occur while executing nemo-cli. | ||
|
||
use thiserror::Error; | ||
|
||
/// Error that occur during execution of Nemo's CLI app | ||
#[derive(Error, Debug)] | ||
pub enum CliError { | ||
/// Error if no input rule files are specified | ||
#[error("no input file was given")] | ||
NoInput, | ||
/// Error if the user asked for an unimplemented feature | ||
#[error("multiple rule files are currently unsupported")] | ||
MultipleFilesNotImplemented, | ||
/// Error while serializing data to a file | ||
#[error("Error while serializing data to {filename}.")] | ||
SerializationError { | ||
/// Name of the file where data could not have been serialized into | ||
filename: String, | ||
}, | ||
/// Errors on reading a file | ||
#[error("failed to read `{filename}`: {error}")] | ||
IoReading { | ||
/// Contains the wrapped error | ||
error: std::io::Error, | ||
/// Filename which caused the error | ||
filename: String, | ||
}, | ||
/// Error while parsing fact for tracing | ||
#[error("unable to parse fact: {fact}")] | ||
TracingInvalidFact { | ||
/// Incorrectly formatted fact | ||
fact: String, | ||
}, | ||
/// Error while parsing a rule file | ||
#[error("unable to parse program `{filename}`")] | ||
ProgramParsing { | ||
/// Filename of the rule file | ||
filename: String, | ||
}, | ||
/// Error resulting from io operations | ||
#[error(transparent)] | ||
IoError(#[from] std::io::Error), | ||
/// Error originating from nemo | ||
#[error(transparent)] | ||
NemoError(#[from] nemo::error::Error), | ||
} |
Oops, something went wrong.