[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Linehook problems
- From: Jon Kleiser <jon.kleiser@...>
- Date: Fri, 3 Nov 2000 13:35:46 +0100
At 10:11 -0200 on 03-11-00, Luiz Henrique de Figueiredo wrote:
>calling error() in the linehook is not aborting anything.
The manual says so:
A hook cannot call lua_error. It must return to Lua through a regular
return. (There is no problem if the error is inside a chunk or a Lua
function called by the hook, because those errors are protected; the
control returns to the hook anyway.)
>Are there other solutions?
Perhaps setting a global flag and testing it in the script?
--lhf
I'd prefer not having to test a flag explicitly in my script. I think
it would have been nicer if my linehook could set a flag at the C
level, and (if possible) have the Lua VM test this flag ...
I cannot use exit(), since that seems to abort my entire Mac
application. I only want to abort the running script.
/Jon
---------------------------------------------------------------------------
Jon Kleiser / ADB ekstern / USIT / University of Oslo / Norway
Mail: Jon.Kleiser@usit.uio.no / Tel: +47-22 85 28 04 / Fax: +47-22 85 29 70
---------------------------------------------------------------------------