On Thu, 6 Nov 2008, Andi Vajda wrote:

>> I suspect the difference is that I was building in non-shared mode.
>>
>> The underlying code is in JCCEnv::reportException()
>>
>>        if (vm_env->IsSameObject(cls, _thr))
>>            throw pythonError(throwable);
>>
>> and above, if _jcc_lib isn't defined:
>>
>>    _thr = (jclass) 
>> vm_env->NewGlobalRef(vm_env->FindClass("java/lang/RuntimeException"));
>>
>> and then macros.h returns NULL when it catches a pythonError.
>>
>> Andi, I presume you're building with shared?  I'll try that, but it might
>> be nice to clear this up for non-shared builds.
>
> Ahhh, I understand now. I can't just assume that all RuntimeError instances
> are python errors. That's the problem.

The fix looks surprisingly simple: check if a python error happened first.

Andi..

_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to