Re:Elixir at PagerDuty
by rabidferret on Thursday June 14, 2018 @04:43PM
(#17315203)
If you don't care about the specific error code as long as it's non-zero, just returning `Result<(), impl Debug>` does what you want on stable now, right?
Re:Elixir at PagerDuty
by steveklabnik on Thursday June 14, 2018 @04:50PM
(#17315255)
That's true, but then you have to juggle Results as your return type everywhere. It's probably a good idea overall, but some people don't want to do that. And yes, you don't get to pick the code. Yet!
panic! does return a non-zero exit code, but isn't really designed for good end-user output.