Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Failing the task isn't the standard way to handle errors; propagating information via the Result type (especially the try! macro) is more conventional, as it allows the caller to handle the problem, failing is very annoying to recover from.

- http://doc.rust-lang.org/nightly/std/result/

- http://doc.rust-lang.org/nightly/std/result/#the-try!-macro



I didn't make that clear enough: I should have qualified by "if the error is indeed fatal at that point".

In the example script, it really doesn't make sense to go on after that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: