lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Vajda (JIRA)" <>
Subject [jira] Commented: (PYLUCENE-1) On unhandled exception into Python, the Java stack trace should be included, and vice/versa
Date Fri, 19 Jun 2009 02:47:08 GMT


Andi Vajda commented on PYLUCENE-1:

In rev 786355, I fixed half of this issue by including the java stacktrace into the string
representation of the object wrapping java errors, instances of JavaError.
The second half of this bug, including a Python stacktrace when reporting an error to Java
remains to be considered.

> On unhandled exception into Python, the Java stack trace should be included, and vice/versa
> -------------------------------------------------------------------------------------------
>                 Key: PYLUCENE-1
>                 URL:
>             Project: PyLucene
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Priority: Minor
> Spinoff from this thread:
> When an unhandled exception escapes Java into python, you get a JavaError python object.
 When this exception is unhandled in Python, you get something like this printed to your stderr:
> You are able to get the stack trace from java:
> {code}
> Traceback (most recent call last):
>   File "", line 22, in <module>
>     go()
>   File "", line 18, in go
>     writer.addDocument(doc)
> lucene.JavaError: java.lang.NullPointerException
> {code}
> But if you call JavaError.getJavaException().printStackTrace(), you see the full trace:
> {code}
> java.lang.NullPointerException
> 	at org.apache.lucene.index.DocInverterPerField.processFields(
> 	at org.apache.lucene.index.DocFieldConsumersPerField.processFields(
> 	at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(
> 	at org.apache.lucene.index.DocumentsWriter.updateDocument(
> 	at org.apache.lucene.index.DocumentsWriter.addDocument(
> 	at org.apache.lucene.index.IndexWriter.addDocument(
> 	at org.apache.lucene.index.IndexWriter.addDocument(
> {code}
> Ideally, somehow (and I'm quite hazy on that), we want better integration so that you'll
see the java part of the traceback, and vice/versa when a Python exception escapes into Java.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message