Bug 47952 - SoftException.printStackTrace(..) should print wrapped throwable too
Summary: SoftException.printStackTrace(..) should print wrapped throwable too
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.2   Edit
Assignee: Wes Isberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-03 00:43 EST by Wes Isberg CLA
Modified: 2004-03-19 09:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2003-12-03 00:43:54 EST
SoftExceptions should print not only their trace but also that of the wrapped
throwable.

We should be able to set a flag on class initialization whether we are running
under 1.4 and then implement it under 1.4 using initCause() and otherwise by
direct delegation.  I can do this fix if we're agreed.
Comment 1 Jim Hugunin CLA 2004-01-12 09:51:10 EST
I think it would be simpler to just fix this so that we do the correct thing 
under 1.4 which supports this notion of nested exceptions, but not to change 
our behavior under 1.3.

However, I have no objections to your fix so long as you're careful to not 
break the runtime on earlier VMs.  We're still promising that aspectjrt.jar 
will work on 1.1.
Comment 2 Wes Isberg CLA 2004-01-15 00:27:45 EST
fixed in tree.  JUnit test passes under 1.1, 1.3, and 1.4.
Comment 3 Wes Isberg CLA 2004-01-15 00:42:04 EST
forgot target 1.2M1

I must say I thought we should use initCause:
-----
public SoftException(Throwable inner) {
  super();
  this.inner = inner;
  if (HAVE_JAVA14 && (null != inner)) {
     initCause(inner);
  }
}
-----
but since you-all didn't when implementing getCause(),
I left it as-is.
Comment 4 Adrian Colyer CLA 2004-03-19 09:55:04 EST
updating target flag to indicate inclusion in 1.2 release.