lua-users home
lua-l archive

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


<347397800602161229yb0e6259i433c5e55a3691c25@mail.gmail.com>
<200602161644.21982.javier@guerrag.com>
In-Reply-To: <200602161644.21982.javier@guerrag.com>
X-Organization: Home
User-Agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.10) POPstar/2.05
Reply-To: lua@bazar2.conectiva.com.br
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

In message <200602161644.21982.javier@guerrag.com> you wrote:

> On Thursday 16 February 2006 3:29 pm, Chris wrote:
> > What is the proper way to do real error handling in Lua?
> 
> almost the only one who has done something constructive in this area
> is Diego Nehab.  read this:
> 
> http://lua-users.org/wiki/FinalizedExceptions
> 
> this code is included in his luasocket package; but i think it
> shouldn't be too hard to rewrite as a separate module

I use it in RiscLua (http://lua.riscos.org.uk/).

Incidentally, errors in RISC OS are always returned as a
struct { int errno; char errmesg[256]; }, with error numbers
assigned in blocks to registered users, with the base of the block
related to similar registrations for software interrupt codes.
The OS itself can then relate the error number to the module
title, because that is registered too.
 
-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/