leif 02/04/28 09:43:14
Modified: altrmi/src/java/org/apache/excalibur/altrmi/common
ExceptionReply.java
Log:
Fill in the stack trace for exception reconstructed across a socket
connection.
The stack traces would otherwise be empty.
Revision Changes Path
1.4 +9 -1
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ExceptionReply.java
Index: ExceptionReply.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ExceptionReply.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExceptionReply.java 24 Apr 2002 12:42:58 -0000 1.3
+++ ExceptionReply.java 28 Apr 2002 16:43:14 -0000 1.4
@@ -16,7 +16,7 @@
*
*
* @author Paul Hammant <a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public final class ExceptionReply extends AltrmiReply
{
@@ -104,5 +104,13 @@
public void readExternal( ObjectInput in ) throws IOException,
ClassNotFoundException
{
mReplyExcpt = (Throwable)in.readObject();
+
+ // When the exception is read in from the stream, its stack trace
will
+ // no longer exist. This is because the stack trace information is
not
+ // serialized with the exception. This can make it difficult to
track
+ // down the source of problems.
+ // To make it at least clear that the exception was remote, fill in
the
+ // stack trace at this point.
+ mReplyExcpt.fillInStackTrace();
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>