Commit Graph

25 Commits

Author SHA1 Message Date
Matthias Beyer a25f650ca0 Be more ergonomic here 2018-04-25 19:13:51 +02:00
Matthias Beyer 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
Matthias Beyer 732fc32b75 Fix trace count space width
Was five here, but should be four.
2018-02-20 20:24:27 +01:00
Matthias Beyer 00b86709b6 Use writeln!() instead of write!() 2018-02-20 19:24:34 +01:00
Matthias Beyer c2dfb2ef52 Refactor timetrack subcommands output for broken pipe errors 2018-02-19 11:14:18 +01:00
Matthias Beyer 6a341d3723 Abstract exit code as a type 2018-02-19 11:14:18 +01:00
Matthias Beyer 256bc47222 Refactor into two independent extensions 2018-02-19 10:40:26 +01:00
Matthias Beyer 39107c5296 Add result extension for translating io errors to exit codes 2018-02-19 10:40:26 +01:00
Matthias Beyer 841d3ffb60 Remove OnErr extension which is not used 2018-02-18 20:04:22 +01:00
Matthias Beyer 5b07baddf8 Add error convenience extension 2018-02-12 21:22:39 +01:00
Matthias Beyer 074f9826fd Implement own displaying implementation for the chain 2018-02-12 21:19:48 +01:00
Matthias Beyer 6dd24f3da3 Keep trace_error{,_dbg} for backwards compatibility 2018-02-12 21:19:47 +01:00
Matthias Beyer e481dbfd12 Rewrite libimagerror to be thin layer over error-chain 2018-02-12 21:19:47 +01:00
Matthias Beyer 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
Matthias Beyer d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
Matthias Beyer 7731b88c97 Remove map_err_trace_exit() calls in favour of map_err_trace_exit_unwrap() 2018-01-29 09:38:32 +01:00
Matthias Beyer 0ae7b6b387 Do not call description() when displaying the error 2017-12-25 19:44:29 +01:00
Matthias Beyer eb4681bf65 Add helper for tracing error and exit or unwrap the value 2017-10-12 19:02:37 +02:00
Matthias Beyer 7ce44e8090 Remove "IntoError" trait, use error_chain functionality 2017-09-03 21:34:07 +02:00
Matthias Beyer 28d7085b2d Remove error_chain dependency, not needed 2017-09-03 21:33:55 +02:00
Matthias Beyer 9713a4632c Remove error_gen module entirely 2017-09-03 15:42:06 +02:00
Matthias Beyer e77d353c52 Rewrite macros to do error-chain behind the scenes 2017-09-03 15:42:03 +02:00
Matthias Beyer a710a5b72b Remove unused variable 2017-08-31 10:57:19 +02:00
Matthias Beyer d0f8002682 Ensure deny() for warnings is in all crates 2017-08-27 20:08:03 +02:00
Matthias Beyer 59a3662ac4 Reorganize code in subdirs 2017-08-27 15:12:09 +02:00