[Spread-users] [PATCH][Java bindings] Significantly improve exception handling
Daniel L. Rall
dlr at collab.net
Thu Apr 22 12:25:48 EDT 2004
It's annoying to have the root cause of a SpreadException discarded. JDK 1.4
provides an additional constructor and set of methods on java.lang.Throwable
to make dealing with the preservation of an exception's root cause much
easyier As not everyone has JDK 1.4 availble, mimic the basics of that
behavior in SpreadException.
Provide human-friendly error messages, and preserve all root
cause exceptions using new JDK 1.4-friendly exception handling.
* javalib/SpreadConnection.java
* javalib/SpreadGroup.java
* javalib/SpreadMessage.java
Provide more human-friendly error messages, and preserved all root
cause exceptions using new methods from SpreadException.
* javalib/SpreadException.java
cause: New field to store root cause of this SpreadException.
SpreadException(String, Throwable): New ctor which sets "cause".
getMessage(): Include the message from "cause" as part of our
message.
printStackTrace(PrintStream), printStackTrace(PrintWriter): Include
the stack trace from "cause".
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
Url: http://lists.spread.org/pipermail/spread-users/attachments/20040422/5c67e260/attachment.pl
More information about the Spread-users
mailing list