Bug 108130

Summary: com.arsdigita.logging.Exceptions throws away some useful info from outer exceptions
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel Berrangé <berrange>
Component: otherAssignee: Daniel Berrangé <berrange>
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-14 04:22:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 106597    

Description Daniel Berrangé 2003-10-27 20:46:07 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
The com.arsdigita.logging.Exceptions#unwrap method is intended to remove all
wrapper exceptions to get back to the root cause. There are however some
circumstances where the wrapper exceptions provide useful information in their
messages & this unwrapping process looses the info. Thus the signature of unwrap
should be changed from

   Throwable unwrap(Throwable t)

to 

   Throwable[] unwrap(Throwable t)

The first element in the returned array should the inner most exception, and
then each subsequent element should contain the next wrapper exception. 

The ErrorReport class should then be changed such that it logs the messages from
all exceptions in the array, and the stack trace from the first exception. This
will ensure the maximal useful information without cluttering up the logs files
with loads of repetative stack traces.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Put a typo in your waf.web.host config entry
2. Request a page
3. The stylesheet resolution dies with an IOException
    

Actual Results:  The IOException stacktrace & useless message  are logged

Expected Results:  The IOException stacktrace & useless message  are logged,
along with the message from the wrapper exception letting the developer know
which URL was being loaded

Additional info:

Comment 1 Daniel Berrangé 2003-10-29 00:02:12 UTC
Based on feedback about interpackage dependencies in Friday's IRC <scrum> the
'Exceptions' class will also move the classes from the 'c.a.logging' package to
'c.a.util'.

Comment 2 Daniel Berrangé 2003-10-29 15:00:03 UTC
Fixed in 37484

For testing, the
//ps/proj/london/aplaws/dev/web/packages/content-section/www/crash-me.jsp script
can be used to trigger an error report on demand :-)


Comment 3 Vadim Nasardinov 2003-11-06 22:38:43 UTC
Why is there two identical interfaces in different packages?

$ p4 filelog //core-platform/dev/src/.../ExceptionUnwrapper.java
//core-platform/dev/src/com/arsdigita/logging/ExceptionUnwrapper.java
... #1 change 37340 branch on 2003/10/23 by justin@justin-bumblebee
(ktext) '       p4 integrate -rb ccm-tes'
... ... add into
//core-platform/dev/src/com/arsdigita/util/ExceptionUnwrapper.java#1
... ... branch into
//core-platform/test-categorization/src/com/arsdigita/logging/ExceptionUnwrapper.java#1
... ... branch from
//core-platform/test-packaging/src/com/arsdigita/logging/ExceptionUnwrapper.java#1
//core-platform/dev/src/com/arsdigita/util/ExceptionUnwrapper.java
... #1 change 37484 add on 2003/10/29 by dan@dan-aplaws-rickshaw
(ktext) '   bz. 108130  Move Exceptions '
... ... branch from
//core-platform/dev/src/com/arsdigita/logging/ExceptionUnwrapper.java#1


Comment 4 Daniel Berrangé 2003-11-07 00:10:42 UTC
I should have deleted logging/ExceptionUnwrapper when it moved to util
package in p4 37484.