lua-users home
lua-l archive

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


WHen you start everything off with pcall(), you can add
your own error handler to the pcall() call.

This means that you can  vector to your own error handler.

lua.c is an example.



+++++++++++++++++++++++++++++++++
>Ok, so I have alternatives for all except LUA_ERRORMESSAGE.
>
>In Lua v4.x  I overloaded the Lua "_ERRORMESSAGE" global error handler
>function so that any errors detected by Lua would call my error handler
>instead of it's own.  But now that function is gone, and I am wondering how
>I can do this in v5.
>
>Brian.
>
>-----Original Message-----
>From: lua-bounces@bazar2.conectiva.com.br
>[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Asko Kauppi
>Sent: Friday, September 12, 2003 3:23 PM
>To: Lua list
>Subject: Re: Lua 5 vs Lua 4
>
>
>
>userdata: isn't it there?  I did make a 4/5 compatibility layer above
>this anyways, you might want to take a look at 'gluax_50.c' (part of
>'gluax-devel', http://sourceforge.net/projects/luacheia).
>
>getglobals: something like 'getfenv' or so now.. (function environment)
>I was actually one of the people for the name change but ..now later..
>would actually like the old terminology back. ;)
>
>Lua on OS X: I use it all the time, but via gluax (no OS X specific
>stuff, graphics go via SDL etc.) What's your concern?
>
>-ak
>
>
>Brian Weed kirjoittaa perjantaina, 12. syyskuuta 2003, kello 20:06:
>
>> Can someone point me to information about what happened to the
>> following :
>>
>> LUA_ERRORMESSAGE
>> lua_pushuserdata
>> lua_getglobals
>> lua_rawcall
>>
>> and alternatives that I should use instead.
>>
>> Also, has anyone successfully used Lua 5 on the Mac (specifically
>> Carbon) or
>> know of any caveats?
>>
>> Brian Weed
>> Senior Software Architect
>> ImaginEngine Corp.
>>