lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Feb 24, 2017 at 12:44 AM, Soni L. <> 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.