diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-08-09 12:32:26 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-08-09 15:47:55 +0200 |
commit | 96a22a0d47b02df01623a1003e74db1c211c9e84 (patch) | |
tree | 9d891f22052c7fb25c6a2a65684208be052a1baf /libimagentryedit | |
parent | 8fd52d0ef1a2725a558bd6f8fb95f614d2193fab (diff) |
Add error module, result module
Diffstat (limited to 'libimagentryedit')
-rw-r--r-- | libimagentryedit/src/error.rs | 10 | ||||
-rw-r--r-- | libimagentryedit/src/lib.rs | 2 | ||||
-rw-r--r-- | libimagentryedit/src/result.rs | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/libimagentryedit/src/error.rs b/libimagentryedit/src/error.rs new file mode 100644 index 00000000..07087e56 --- /dev/null +++ b/libimagentryedit/src/error.rs @@ -0,0 +1,10 @@ +generate_error_module!( + generate_error_types!(EditError, EditErrorKind, + IOError => "IO Error" + ); +); + +pub use self::error::EditError; +pub use self::error::EditErrorKind; +pub use self::error::MapErrInto; + diff --git a/libimagentryedit/src/lib.rs b/libimagentryedit/src/lib.rs index 7819d8d8..62cff1e4 100644 --- a/libimagentryedit/src/lib.rs +++ b/libimagentryedit/src/lib.rs @@ -4,3 +4,5 @@ extern crate libimagrt; extern crate tempfile; pub mod edit; +pub mod error; +pub mod result; diff --git a/libimagentryedit/src/result.rs b/libimagentryedit/src/result.rs new file mode 100644 index 00000000..7e58f0fe --- /dev/null +++ b/libimagentryedit/src/result.rs @@ -0,0 +1,6 @@ +use std::result::Result as RResult; + +use error::EditError; + +pub type Result<T> = RResult<T, EditError>; + |