Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-07 Thread Aaron Lav
On Thu, Nov 06, 2008 at 05:23:07PM -0800, Andi Vajda wrote: > The fix looks surprisingly simple: check if a python error happened first. This works for me: thanks. Aaron Lav ([EMAIL PROTECTED]) ___ pylucene-dev mailing list pylucene-dev@osafoundatio

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-06 Thread Andi Vajda
On Thu, 6 Nov 2008, Andi Vajda wrote: > The fix looks surprisingly simple: check if a python error happened first. Fix checked into rev 485. Andi.. ___ pylucene-dev mailing list pylucene-dev@osafoundation.org http://lists.osafoundation.org/mailman/li

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-06 Thread Andi Vajda
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 d

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-06 Thread Andi Vajda
On Thu, 6 Nov 2008, Aaron Lav wrote: > On Tue, Nov 04, 2008 at 01:25:10PM -0500, Aaron Lav wrote: >> On Tue, Nov 04, 2008 at 10:02:22AM -0800, Andi Vajda wrote: >>> >>> DateField.dateToString(Date(0,1,1)) >>> Traceback (most recent call last): >>>File "", line 1, in >>> luc

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-06 Thread Andi Vajda
On Thu, 6 Nov 2008, Aaron Lav wrote: > On Tue, Nov 04, 2008 at 01:25:10PM -0500, Aaron Lav wrote: >> On Tue, Nov 04, 2008 at 10:02:22AM -0800, Andi Vajda wrote: >>> >>> DateField.dateToString(Date(0,1,1)) >>> Traceback (most recent call last): >>>File "", line 1, in >>> luc

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-06 Thread Aaron Lav
On Tue, Nov 04, 2008 at 01:25:10PM -0500, Aaron Lav wrote: > On Tue, Nov 04, 2008 at 10:02:22AM -0800, Andi Vajda wrote: > > >>> DateField.dateToString(Date(0,1,1)) > > Traceback (most recent call last): > >File "", line 1, in > > lucene.JavaError: java.lang.RuntimeException

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-04 Thread Andi Vajda
On Nov 4, 2008, at 10:25, Aaron Lav <[EMAIL PROTECTED]> wrote: > On Tue, Nov 04, 2008 at 10:02:22AM -0800, Andi Vajda wrote: >> >> On Tue, 4 Nov 2008, Aaron Lav wrote: >>> >>> (I had to call SimpleDateFormat().parse(), since I got an >>> InvalidArgsError >>> with just "DateField.dateToString(Da

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-04 Thread Aaron Lav
On Tue, Nov 04, 2008 at 10:02:22AM -0800, Andi Vajda wrote: > > On Tue, 4 Nov 2008, Aaron Lav wrote: > > > > (I had to call SimpleDateFormat().parse(), since I got an InvalidArgsError > > with just "DateField.dateToString(Date(0,1,1))") > They seem to work the same. No InvalidArgsError. What Inval

Re: [pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-04 Thread Andi Vajda
On Tue, 4 Nov 2008, Aaron Lav wrote: > I noticed that sometimes the Python exception isn't correctly set > when a Java method throws a java RuntimeException, which causes a Python > SystemError. > > I've attached a test case which specifies JavaError, since that's what > the old PyLucene did: > >

[pylucene-dev] Python exception not always generated for Java RuntimeException

2008-11-04 Thread Aaron Lav
I noticed that sometimes the Python exception isn't correctly set when a Java method throws a java RuntimeException, which causes a Python SystemError. I've attached a test case which specifies JavaError, since that's what the old PyLucene did: >>> DateField.dateToString(SimpleDateFormat('-M