# Pretty print errors from \`main() -\> Result\<(), failure::Error\>\`

**URL:** <https://users.rust-lang.org/t/pretty-print-errors-from-main-result-failure-error/17669>\
**Category:** help\
**Created:** [May 24, 2018, 12:28pm UTC](https://users.rust-lang.org/t/pretty-print-errors-from-main-result-failure-error/17669 "2018-05-24T12:28:24Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![tismith](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/tismith/32/7463_2.png) [@tismith](https://users.rust-lang.org/u/tismith)\
**Post date:** [May 24, 2018, 10:09pm UTC](https://users.rust-lang.org/t/pretty-print-errors-from-main-result-failure-error/17669/10 "2018-05-24T22:09:23Z")

</div>

I've written a small crate that takes exactly this approach and provides a newtype wrapper around `failure::Error` - [exitfailure](https://crates.io/crates/exitfailure). Lets me just use a `main() -> Result<(), ExitFailure>` and have the pretty printing taken care of.

It's nothing fancy but it saves me writing all that boilerplate for each project.

---

_[View the full topic](https://users.rust-lang.org/t/pretty-print-errors-from-main-result-failure-error/17669)._
