monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] 3rd party libraries


From: Zack Weinberg
Subject: Re: [Monotone-devel] 3rd party libraries
Date: Sat, 25 Oct 2008 08:44:11 -0700

On Sat, Oct 25, 2008 at 2:17 AM, Markus Wanner <address@hidden> wrote:
> So far I thought that the exceptions from C++ compiled lua were
> propagated to monotone. But that doesn't seem to be the case. No matter
> if lua is compiled to use C++ exceptions internally or not, we are
> calling lua functions via lua_pcall() in Lua::call(). That's a
> "protected call" which returns a boolean upon failure.

This is what I meant about the errors mostly just vanishing.

Be careful, though:

>>
>>   exec_ok = Lua(st)
>>     .func("use_inodeprints")
>>     .call(0, 1)
>>     .extract_bool(use)
>>     .ok();
>>   return use && exec_ok;
>> }

I may be wrong, but my understanding is that the .func() will raise a
lua exception if "use_inodeprints" isn't defined at all, and we _do_
want to ignore that error.

So you're going to have to go through every place where Lua *might*
throw and decide whether it ought to be ignored or not.

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]