-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Otherwise, there are lifetime issues because 'a must outlive static for some reason and that can't happen since we read the names from the loaded file.
- Loading branch information
1 parent
cd2e768
commit cda532d
Showing
15 changed files
with
203 additions
and
231 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,23 +1,36 @@ | ||
extern crate clap; | ||
extern crate tabled; | ||
extern crate thiserror; | ||
|
||
use snafu::prelude::*; | ||
use std::io; | ||
|
||
use thiserror::Error; | ||
|
||
use crate::prelude::AniseError; | ||
use crate::{ | ||
naif::daf::{file_record::FileRecordError, DAFError}, | ||
prelude::AniseError, | ||
}; | ||
|
||
pub mod args; | ||
|
||
pub mod inspect; | ||
|
||
#[derive(Debug, Error)] | ||
#[derive(Debug, Snafu)] | ||
#[snafu(visibility(pub))] | ||
pub enum CliErrors { | ||
#[error("File not found or unreadable")] | ||
FileNotFound(#[from] io::Error), | ||
#[error("ANISE error encountered")] | ||
AniseError(#[from] AniseError), | ||
#[error("{0}")] | ||
ArgumentError(String), | ||
/// File not found or unreadable | ||
FileNotFound { | ||
source: io::Error, | ||
}, | ||
/// ANISE error encountered" | ||
SomeDAF { | ||
source: DAFError, | ||
}, | ||
SomeFileRecord { | ||
source: FileRecordError, | ||
}, | ||
ArgumentError { | ||
arg: String, | ||
}, | ||
AniseError { | ||
err: AniseError, | ||
}, | ||
} |
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.