You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by to...@apache.org on 2001/12/18 20:41:58 UTC

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

tomj        01/12/18 11:41:58

  Modified:    java/src/javax/xml/rpc JAXRPCException.java
  Log:
  Add additional methods specified in JAX-RPC.
  
  Revision  Changes    Path
  1.6       +35 -3     xml-axis/java/src/javax/xml/rpc/JAXRPCException.java
  
  Index: JAXRPCException.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/JAXRPCException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JAXRPCException.java	2001/10/30 16:46:33	1.5
  +++ JAXRPCException.java	2001/12/18 19:41:58	1.6
  @@ -62,6 +62,8 @@
    */
   public class JAXRPCException extends Exception {
   
  +    Throwable cause;
  +    
       /**
        * Constructs a new exception with null as its detail message. 
        */
  @@ -70,10 +72,40 @@
       /**
        * Constructs a new exception with the specified detail message. 
        *
  -     * @param exp
  +     * @param message exception message
        */
  -    public JAXRPCException(String exp) {
  -        super(exp);
  +    public JAXRPCException(String message) {
  +        super(message);
  +    }
  +    
  +    /**
  +     * Constructs a new exception which wraps another exception.
  +     * 
  +     * @param cause the exception to wrap
  +     */ 
  +    public JAXRPCException(Throwable cause) {
  +        this.cause = cause;
  +    }
  +    
  +    /**
  +     * Contructs a new exception with the specified detail message and
  +     * wraps another exception.
  +     * 
  +     * @param message exception message
  +     * @param cause the exception to wrap
  +     */ 
  +    public JAXRPCException(String message, Throwable cause) {
  +        super(message);
  +        this.cause = cause;
  +    }
  +
  +    /**
  +     * Returns the exception wrapped by this JAXRPCException
  +     * 
  +     * @return exception or null if none.
  +     */ 
  +    public Throwable getCause() {
  +        return cause;
       }
   }