Minor change to fern init results and added to error file
This commit is contained in:
parent
cc8467ad45
commit
2e6f087a3a
|
@ -37,6 +37,9 @@ matrix:
|
|||
rust: nightly
|
||||
before_script: rustup target add $TARGET
|
||||
script: cargo build --release --target $TARGET
|
||||
on:
|
||||
branch: master
|
||||
tags: true
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
@ -49,6 +52,9 @@ matrix:
|
|||
rust: nightly
|
||||
before_script: rustup target add $TARGET
|
||||
script: cargo build --release --target $TARGET
|
||||
on:
|
||||
branch: master
|
||||
tags: true
|
||||
<<: *DEPLOY_TO_GITHUB
|
||||
|
||||
notifications:
|
||||
|
|
|
@ -25,6 +25,7 @@ heim = "0.0.7"
|
|||
heim-common = "0.0.7"
|
||||
log = "0.4"
|
||||
rayon = "1.2"
|
||||
regex = "1.3.1"
|
||||
sysinfo = "0.9.4"
|
||||
tokio = "0.2.0-alpha.4"
|
||||
winapi = "0.3.8"
|
||||
|
|
|
@ -34,7 +34,7 @@ enum Event<I, J> {
|
|||
}
|
||||
|
||||
fn main() -> error::Result<()> {
|
||||
let _log = utils::logging::init_logger(); // TODO: Note this could fail and we wouldn't know... consider whether it is worth dealing with
|
||||
utils::logging::init_logger()?;
|
||||
|
||||
// Parse command line options
|
||||
let matches = clap_app!(app =>
|
||||
|
|
|
@ -32,6 +32,11 @@ pub enum RustopError {
|
|||
/// The data provided is the error found.
|
||||
#[fail(display = "ERROR: Invalid generic error: {}", message)]
|
||||
GenericError { message : String },
|
||||
/// An error to represent errors with fern
|
||||
///
|
||||
/// The data provided is the error found.
|
||||
#[fail(display = "ERROR: Invalid fern error: {}", message)]
|
||||
FernError { message : String },
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for RustopError {
|
||||
|
@ -63,3 +68,9 @@ impl From<std::string::String> for RustopError {
|
|||
RustopError::GenericError { message : err.to_string() }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<fern::InitError> for RustopError {
|
||||
fn from(err : fern::InitError) -> Self {
|
||||
RustopError::FernError { message : err.to_string() }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue