Issue 65977

Summary: [PATCH] Throw Java trace on JNI error
Product: udk Reporter: geki <h.mth>
Component: codeAssignee: geki <h.mth>
Status: CLOSED WONT_FIX QA Contact: issues@udk <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: current   
Target Milestone: ---   
Hardware: PC   
OS: Linux, all   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
throw exception on jni error none

Description geki 2006-05-31 19:40:20 UTC
Summary says it.
Patch is on URL.

Is this ok to include?
Always good to know why it fails. ;)
Comment 1 Stephan Bergmann 2006-06-01 10:35:21 UTC
I do not like the idea of unconditionally polluting stderr (or whereever the JVM
decides to print ExceptionDescribe).  Better approaches IMO would be:
- Either statically #ifdef OSL_DEBUG_LEVEL>0 so that it is only active in debug
builds;
- or some dynamic osl debug mechanism, based on environment variables etc.
(which is not in place, however);
- or obtaining information about the exception via JNI and putting that into the
RuntimeException's string.
Comment 2 geki 2006-06-01 10:59:45 UTC
I am against that debug-only enabled Java trace. Have a look at the thread:
http://lists.ximian.com/pipermail/openoffice/2006-May/001826.html

It would have saved me some time if there had been a trace from beginning. ;)

So a more verbose RuntimeException is the only way I see.

Still, it is just a Java trace like any other if some Java code fails.
And I do not like to hide the traces. Makes debugging really hard.
Well, just my thoughts. ;)
Comment 3 kay.ramme 2006-06-07 13:40:50 UTC
KR->Gekl: The right approach is certainly, to add the description to the
exception message. Polluting the console is _no_ option (just imagine everybody
doing so ;-).
Comment 4 kay.ramme 2006-06-09 12:39:06 UTC
KR->Geki: Please take this back ...
Comment 5 geki 2006-10-01 15:43:23 UTC
Since this happens only with broken JVMs it is no real issue of OpenOffice.org.
Closing as WONTFIX.

Anyone having this kind of issue can apply the patch to see what is going on.
Comment 6 geki 2006-10-01 15:45:22 UTC
Created attachment 39491 [details]
throw exception on jni error
Comment 7 geki 2006-10-21 11:38:32 UTC
closing...