[Xapian-devel] GSoC xapian node binding

Liam xapian at networkimprov.net
Wed May 23 21:35:02 BST 2012


On Tue, May 22, 2012 at 8:12 PM, Liam <xapian at networkimprov.net> wrote:

>
> Re latest code...
>

Few more notes...

In op.h, tryCallCatch, GetInstance, sendToThreadPool, kBusyMsg should be
declared without static (since now used by multiple .cc files) and be
defined in util.cc or similar.

In the_do functions, since they no longer ThrowException()
  if (mBusy) throw Exception::Error(...)
similar to when _process returns error

Correcting previous code snippet to use Handle<Value>:
  Handle<Value> aResult;
  try { /// if we pull the try/catch from the _do functions
    aResult = aAsync ? GetMset_async(...) : GetMset_sync(...); /// or
GetMset_do(aAsync, ...)
  } catch (Handle<Value> ex) {
    ...
Local<Value> is for declaring a value in the current HandleScope. (Yes, my
orig code used Local in catch.)

GetMset_convert doesn't need a HandleScope, since callers have it.

Could we put the _data ptr into AsyncOp? That should eliminate the need for
OpInfo?

In your testing, make sure to trigger all the possible catch blocks. (You
might have to insert throws, e.g. to simulate a Xapian error.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20120523/101135e6/attachment.htm>


More information about the Xapian-devel mailing list