[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Error handling
- From: Chris <coderight@...>
- Date: Thu, 16 Feb 2006 16:35:08 -0500
On 2/16/06, LEGO <firstname.lastname@example.org> wrote:
AFAIK you can do ADA's like error handling in lua.
The problem with string error messages can be pointed at in your own example:
elseif problem == "radiu failure"
Numeric error codes (or other "fixed" types like an exception) are much
more useful for error handling in code. The strings are good for
the end user for sure but code needs a little more.
This is especially true when dealing with multiple languages like I
am. I have a Lua backend interfacing to C, XML-RPC, and
all these systems in play (versus numeric codes which would be easy to
deal with in all those systems).