You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ga...@apache.org on 2004/05/10 23:11:19 UTC

cvs commit: ws-axis/java/src/javax/xml/rpc JAXRPCException.java ServiceException.java

gawor       2004/05/10 14:11:19

  Modified:    java/src/javax/xml/rpc JAXRPCException.java
                        ServiceException.java
  Log:
  print stack traces of the cause
  
  Revision  Changes    Path
  1.14      +31 -2     ws-axis/java/src/javax/xml/rpc/JAXRPCException.java
  
  Index: JAXRPCException.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/javax/xml/rpc/JAXRPCException.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JAXRPCException.java	25 Feb 2004 14:02:25 -0000	1.13
  +++ JAXRPCException.java	10 May 2004 21:11:19 -0000	1.14
  @@ -56,9 +56,7 @@
        *            retrieval throw by the getCause method
        */
       public JAXRPCException(String message, Throwable cause) {
  -
           super(message);
  -
           this.cause = cause;
       }
   
  @@ -75,6 +73,7 @@
        *          unknown.)
        */
       public JAXRPCException(Throwable cause) {
  +        super(cause.toString());
           this.cause = cause;
       }
   
  @@ -87,5 +86,35 @@
       public Throwable getLinkedCause() {
           return cause;
       }
  +
  +    public void printStackTrace() { 
  +	synchronized (System.err) {
  +            System.err.println(this);
  +	    printStackTrace(System.err);
  +        }
  +    }
  +    
  +    public void printStackTrace(java.io.PrintStream ps) {
  +	if (this.cause == null) {
  +	    super.printStackTrace(ps);
  +	} else {
  +	    synchronized(ps) {
  +		ps.println(this);
  +		this.cause.printStackTrace(ps);
  +	    }
  +	}
  +    }
  +    
  +    public void printStackTrace(java.io.PrintWriter pw) {
  +	if (this.cause == null) {
  +	    super.printStackTrace(pw);
  +	} else {
  +	    synchronized(pw) {
  +		pw.println(this);
  +		this.cause.printStackTrace(pw);
  +	    }
  +	}
  +    }
  +    
   }
   
  
  
  
  1.8       +31 -2     ws-axis/java/src/javax/xml/rpc/ServiceException.java
  
  Index: ServiceException.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/javax/xml/rpc/ServiceException.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ServiceException.java	25 Feb 2004 14:02:26 -0000	1.7
  +++ ServiceException.java	10 May 2004 21:11:19 -0000	1.8
  @@ -58,9 +58,7 @@
        *            method
        */
       public ServiceException(String message, Throwable cause) {
  -
           super(message);
  -
           this.cause = cause;
       }
   
  @@ -77,6 +75,7 @@
        *          unknown.)
        */
       public ServiceException(Throwable cause) {
  +        super(cause.toString());
           this.cause = cause;
       }
   
  @@ -89,5 +88,35 @@
       public Throwable getLinkedCause() {
           return cause;
       }
  +
  +    public void printStackTrace() { 
  +	synchronized (System.err) {
  +            System.err.println(this);
  +	    printStackTrace(System.err);
  +        }
  +    }
  +    
  +    public void printStackTrace(java.io.PrintStream ps) {
  +	if (this.cause == null) {
  +	    super.printStackTrace(ps);
  +	} else {
  +	    synchronized(ps) {
  +		ps.println(this);
  +		this.cause.printStackTrace(ps);
  +	    }
  +	}
  +    }
  +    
  +    public void printStackTrace(java.io.PrintWriter pw) {
  +	if (this.cause == null) {
  +	    super.printStackTrace(pw);
  +	} else {
  +	    synchronized(pw) {
  +		pw.println(this);
  +		this.cause.printStackTrace(pw);
  +	    }
  +	}
  +    }
  +    
   }