lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Vajda (JIRA)" <j...@apache.org>
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

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

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: 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.


Mime
View raw message