[ 
https://issues.apache.org/jira/browse/PYLUCENE-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721715#action_12721715
 ] 

Michael McCandless commented on PYLUCENE-1:
-------------------------------------------

Presumably the half you've fixed is the most important one?  Ie, usually one 
gets unhandled Java exceptions up through Python, less commonly vice/versa, 
when using PyLucene.

> On unhandled exception into Python, the Java stack trace should be included, 
> and vice/versa
> -------------------------------------------------------------------------------------------
>
>                 Key: PYLUCENE-1
>                 URL: https://issues.apache.org/jira/browse/PYLUCENE-1
>             Project: PyLucene
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Priority: Minor
>
> Spinoff from this thread:
>   http://markmail.org/message/lupg3umtwl6wopoj
> 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 "testFieldReuse.py", line 22, in <module>
>     go()
>   File "testFieldReuse.py", 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(DocInverterPerField.java:81)
>       at 
> org.apache.lucene.index.DocFieldConsumersPerField.processFields(DocFieldConsumersPerField.java:36)
>       at 
> org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:234)
>       at 
> org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:765)
>       at 
> org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:743)
>       at 
> org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1917)
>       at 
> org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1895)
> {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.

Reply via email to