lua-users home
lua-l archive

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

For what it's worth, I haven't had to use @try to wrap any of my APIs
so far, and have not had any bug reports from users about exceptions
either. Then again, I'm not using an ObjC bridge, but writing a Lua
API that wraps ObjC without such tight coupling.

On Thu, Jul 10, 2014 at 9:28 PM, Eric Wing <> wrote:
> On 7/10/14, Alex Szpakowski <> wrote:
>> Eric Wing wrote
>>> One thing I still would like to see is Lua's exception handling
>>> (implementation detail) refactored in a way that allows me to more
>>> easily change it so I can make it use Apple's Obj-C @try/@catch
>>> exception mechanism without compiling all of Lua as Obj-C.
>> Cocoa isn't exception-safe, FWIW.
> There are real world cases that come up where it is invaluable to
> catch an exception thrown by Cocoa. (Usually dealing/working around
> Apple bugs.)
> Also, when you do things like REPL with Lua + Cocoa, it is extremely
> valuable that the Lua interpreter know an exception is thrown.
> Otherwise things can get really messed up otherwise the Lua state
> thinks you are still in one place, while in reality everything jumped
> somewhere else.
> -Eric
> --
> Beginning iPhone Games Development