Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 15843 invoked from network); 19 Jun 2009 03:01:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jun 2009 03:01:17 -0000 Received: (qmail 54667 invoked by uid 500); 19 Jun 2009 02:50:59 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 54647 invoked by uid 500); 19 Jun 2009 02:50:59 -0000 Mailing-List: contact pylucene-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-dev@lucene.apache.org Delivered-To: moderator for pylucene-dev@lucene.apache.org Received: (qmail 50376 invoked by uid 99); 19 Jun 2009 02:47:39 -0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Message-ID: <2144959944.1245379628150.JavaMail.jira@brutus> Date: Thu, 18 Jun 2009 19:47:08 -0700 (PDT) From: "Andi Vajda (JIRA)" To: pylucene-dev@lucene.apache.org Subject: [jira] Commented: (PYLUCENE-1) On unhandled exception into Python, the Java stack trace should be included, and vice/versa In-Reply-To: <209971007.1236967316741.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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 > 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.