c2f674cc29
libimagerror: Move from error-chain to failure
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
c160a967ec
Add error kinds
2018-10-30 18:46:28 +01:00
a25f650ca0
Be more ergonomic here
2018-04-25 19:13:51 +02:00
84249e3fb5
Be less verbose when constructing an object
...
The rust compiler does some fancy things for us: It automatically finds
the right fields if the name of the variable and the file is the same.
Lets use that to reduce boilerplate with this patch.
2018-04-25 19:13:50 +02:00
732fc32b75
Fix trace count space width
...
Was five here, but should be four.
2018-02-20 20:24:27 +01:00
00b86709b6
Use writeln!() instead of write!()
2018-02-20 19:24:34 +01:00
c2dfb2ef52
Refactor timetrack subcommands output for broken pipe errors
2018-02-19 11:14:18 +01:00
6a341d3723
Abstract exit code as a type
2018-02-19 11:14:18 +01:00
256bc47222
Refactor into two independent extensions
2018-02-19 10:40:26 +01:00
39107c5296
Add result extension for translating io errors to exit codes
2018-02-19 10:40:26 +01:00
841d3ffb60
Remove OnErr extension which is not used
2018-02-18 20:04:22 +01:00
5b07baddf8
Add error convenience extension
2018-02-12 21:22:39 +01:00
074f9826fd
Implement own displaying implementation for the chain
2018-02-12 21:19:48 +01:00
6dd24f3da3
Keep trace_error{,_dbg} for backwards compatibility
2018-02-12 21:19:47 +01:00
e481dbfd12
Rewrite libimagerror to be thin layer over error-chain
2018-02-12 21:19:47 +01:00
863b52c2f0
Add TraceIterator::trace_unwrap_exit()
...
* Exits on the first Err(_)
* Introduces new Iterator type for iterating with unwrap and exit on
error
2018-02-10 16:41:06 +01:00
d5a9e4930d
Update dates in license header
...
And add missing header in one file
2018-02-07 02:48:53 +01:00
7731b88c97
Remove map_err_trace_exit() calls in favour of map_err_trace_exit_unwrap()
2018-01-29 09:38:32 +01:00
0ae7b6b387
Do not call description() when displaying the error
2017-12-25 19:44:29 +01:00
eb4681bf65
Add helper for tracing error and exit or unwrap the value
2017-10-12 19:02:37 +02:00
7ce44e8090
Remove "IntoError" trait, use error_chain functionality
2017-09-03 21:34:07 +02:00
28d7085b2d
Remove error_chain dependency, not needed
2017-09-03 21:33:55 +02:00
9713a4632c
Remove error_gen module entirely
2017-09-03 15:42:06 +02:00
e77d353c52
Rewrite macros to do error-chain behind the scenes
2017-09-03 15:42:03 +02:00
a710a5b72b
Remove unused variable
2017-08-31 10:57:19 +02:00
d0f8002682
Ensure deny() for warnings is in all crates
2017-08-27 20:08:03 +02:00
59a3662ac4
Reorganize code in subdirs
2017-08-27 15:12:09 +02:00