[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Propagate 1.0 - Error/status propagation in Lua
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 24 Feb 2017 10:08:07 +0200
On Fri, Feb 24, 2017 at 12:44 AM, Soni L. <fakedme@gmail.com> wrote:
> Propagate is a module for cleanly propagating error/status codes to the
> caller.
Here's an idea for error handling. I've been playing with Rust, which
is famous for not having exceptions. There's an external library
called error-chain which does something very cool; when you have an
I/O error, you can chain the error so that you return _your_ error,
which contains a list of errors that _caused_ your error. So you can
return 'cannot open contacts file' as an error which contains the
original i/o error, etc.