This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

JDK 1.4 Exceptions merge from classpath


Bryce McKinlay writes:
 > This patch merges in most of the JDK 1.4-style exception chaining 
 > support that Mark Wielaard and Eric Blake implemented in classpath. 
 > Throwable isn't completely merged, the "cause" property is there but 
 > printStackTrace() doesn't use it yet. The next step will be to refactor 
 > fillInStackTrace() to fill out StackTraceElements and for 
 > printStackTrace() to use them.

There's a slight problem with this.  

fillInStackTrace() is called by Throwable's constructor.  At the
moment, fillInStackTrace() is very efficient because extracting
filenames and so on is only done when converting to text form.  IMO
it'd be better to fill in the members of StackTraceElement lazily.  I
think this can be done without breaking any standard interfaces.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]