/*
 * Copyright (c) 2004 University of Murcia.  All rights reserved.
 * --------------------------------------------------------------
 * For more information, please see <http://www.umu.euro6ix.org/>.
 */

package org.umu.cops.ospep;

/**
 * COPS PEP Exception
 *
 * @version COPSPepException.java, v 2.00 2004
 *
 */
public class COPSPepException extends Exception {

    private int rc;
    final static int GENERAL_ERROR = 0x00000001;

    /**
     * Creates a <tt>COPSPdpException</tt> with the given message.
     * @param msg    Exception message
     */

    public COPSPepException(String msg) {
        super(msg);
        rc=0;
    }

    /**
      * Creates a <tt>COPSPdpException</tt> with the given message and return code.
      * @param msg      Exception message
      * @param retCode     Return code
      */
    public COPSPepException(String msg, int retCode) {
        super(msg);
        rc = retCode;
    }

    /**
     * Returns the return code of the exception
     *
     * @return   Exception's return code
     *
     */
    public int returnCode() {
        return rc;
    }

}

@@ -237,16 +237,60 @@
 pep;%0D%0A%0D%0A
+import org.umu.cops.stack.COPSException;%0D%0A%0D%0A
 /**%0D%0A * 
@@ -412,133 +412,12 @@
 nds 
-Exception %7B%0D%0A%0D%0A    private int rc;%0D%0A    final static int GENERAL_ERROR = 0x00000001;%0D%0A%0D%0A    /**%0D%0A     * Creates a %3Ctt%3E
 COPS
-Pdp
 Exce
@@ -425,86 +425,10 @@
 tion
-%3C/tt%3E with the given message.%0D%0A     * @param msg    Exception message%0D%0A     */
+ %7B
 %0D%0A%0D%0A
@@ -462,19 +462,17 @@
 (String 
-msg
+s
 ) %7B%0D%0A   
@@ -478,35 +478,33 @@
       super(
-msg
+s
 );%0D%0A    
     rc=0;%0D%0A 
@@ -495,213 +495,11 @@
     
-    rc=0;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A      * Creates a %3Ctt%3ECOPSPdpException%3C/tt%3E with the given message and return code.%0D%0A      * @param msg      Exception message%0D%0A      * @param retCode     Return code%0D%0A      */
+%7D%0D%0A
 %0D%0A  
@@ -573,32 +573,17 @@
 (msg
-);%0D%0A        rc =
+,
  retCode
 ;%0D%0A 
@@ -578,16 +578,17 @@
  retCode
+)
 ;%0D%0A    %7D
@@ -599,177 +599,81 @@
     
-/**%0D%0A     * Returns the return code of the exception%0D%0A     *%0D%0A     * @return   Exception's return code%0D%0A     *%0D%0A     */%0D%0A    public int returnCode() %7B%0D%0A        return rc
+public COPSPepException(String msg, Throwable t) %7B%0D%0A        super(msg, t)
 ;%0D%0A 

Generalize the COPSPepException class to a COPSException to make upstream exception handling easier.