<br><br><div class="gmail_quote">On Tue, May 22, 2012 at 8:12 PM, Liam <span dir="ltr"><<a href="mailto:xapian@networkimprov.net" target="_blank">xapian@networkimprov.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div><br>Re latest code...<br></div></div></blockquote><div><br>Few more notes... <br></div><div><br>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.<br>
<br>In the_do functions, since they no longer ThrowException()<br> if (mBusy) throw Exception::Error(...)<br>similar to when _process returns error<br><br>Correcting previous code snippet to use Handle<Value>:<br>
Handle<Value> aResult;<br> try { /// if we pull the try/catch from the _do functions<br> aResult = aAsync ? GetMset_async(...) : GetMset_sync(...); /// or GetMset_do(aAsync, ...)<br> } catch (Handle<Value> ex) {<br>
...<br>Local<Value> is for declaring a value in the current HandleScope. (Yes, my orig code used Local in catch.)<br><br>GetMset_convert doesn't need a HandleScope, since callers have it.<br><br>Could we put the _data ptr into AsyncOp? That should eliminate the need for OpInfo?<br>
<br>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.)<br><br></div></div>