On Thu, 18 Jun 2009, Andi Vajda wrote:

I think a better fix would be to wrap the error reported by findClass with more context information. A plain class not found error already reports the failed class's name:

File "/Users/vajda/tmp/Python-2.6.2/install/Python.framework/Versions/2.6/lib/python2.6/site-packages/JCC-2.3-py2.6-macosx-10.5-i386.egg/jcc/cpp.py", line 370, in jcc
   for className in excludes])
jcc.cpp.JavaError: java.lang.NoClassDefFoundError: org/apache/lucene/queryParser/Token1

I'm going to implement some findClass error wrapping now.

Instead, I fixed half of bug PYLUCENE-1 [1] by including the stacktrace of a Java exception into the string representation of the Python error object wrapping it. When a JavaError is reported, the corresponding java stacktrace is now included in the error message.

This is checked into rev 786355 and requires JCC and PyLucene rebuilds to take effect.

Andi..

[1] https://issues.apache.org/jira/browse/PYLUCENE-1

Reply via email to