You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2002/04/28 18:43:14 UTC

cvs commit: jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common ExceptionReply.java

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:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>