Bug 108130 - com.arsdigita.logging.Exceptions throws away some useful info from outer exceptions
Summary: com.arsdigita.logging.Exceptions throws away some useful info from outer exce...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: 106597
TreeView+ depends on / blocked
 
Reported: 2003-10-27 20:46 UTC by Daniel Berrangé
Modified: 2007-04-18 16:58 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-11-14 04:22:53 UTC
Embargoed:


Attachments (Terms of Use)

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.



Note You need to log in before you can comment on or make changes to this bug.