Update error
This commit is contained in:
parent
cd7e668d13
commit
dc9669ceb9
@ -7,4 +7,4 @@ edition = "2018"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
failure = "*"
|
failure = "0.1.5"
|
||||||
|
@ -2,6 +2,7 @@ use failure::{Backtrace, Context, Fail};
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
use std::io::Error as IOError;
|
use std::io::Error as IOError;
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -9,8 +10,14 @@ use std::io::Error as IOError;
|
|||||||
pub enum ErrorKind {
|
pub enum ErrorKind {
|
||||||
#[fail(display = "IO error")]
|
#[fail(display = "IO error")]
|
||||||
Io,
|
Io,
|
||||||
|
#[fail(display = "File error: {:?}", _0)]
|
||||||
|
File(PathBuf),
|
||||||
|
#[fail(display = "Include error")]
|
||||||
|
Include,
|
||||||
#[fail(display = "Parse error")]
|
#[fail(display = "Parse error")]
|
||||||
Parse,
|
Parse,
|
||||||
|
#[fail(display = "Preprocess error")]
|
||||||
|
Preprocess,
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user