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

package org.umu.cops.ospdp;

/**
 * COPS PEP Exception
 *
 * @version COPSPepException.java, v 2.00 2004
 *
 */
public class COPSPdpException 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 COPSPdpException(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 COPSPdpException(String msg, int retCode) {
        super(msg);
        rc = retCode;
    }

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

}

@@ -237,16 +237,60 @@
 pdp;%0D%0A%0D%0A
+import org.umu.cops.stack.COPSException;%0D%0A%0D%0A
 /**%0D%0A * 
@@ -408,16 +408,20 @@
 extends 
+COPS
 Exceptio
@@ -431,81 +431,8 @@
 %0D%0A%0D%0A
-    private int rc;%0D%0A    final static int GENERAL_ERROR = 0x00000001;%0D%0A%0D%0A
     
@@ -517,33 +517,32 @@
 * @param msg    
- 
 Exception messag
@@ -621,23 +621,8 @@
 );%0D%0A
-        rc=0;%0D%0A
     
@@ -737,24 +737,26 @@
 ram msg     
+  
 Exception me
@@ -786,18 +786,16 @@
 tCode   
-  
 Return c
@@ -885,32 +885,17 @@
 (msg
-);%0D%0A        rc =
+,
  retCode
 ;%0D%0A 
@@ -890,16 +890,17 @@
  retCode
+)
 ;%0D%0A    %7D
@@ -923,146 +923,251 @@
   * 
-Gets the return code of the exception%0D%0A     * @return   Exception's return code%0D%0A     */%0D%0A    public int returnCode() %7B%0D%0A        return rc
+Creates a %3Ctt%3ECOPSPdpException%3C/tt%3E with the given message and throwable.%0D%0A     * @param msg       Exception message%0D%0A     * @param t         the Throwable%0D%0A     */%0D%0A    public COPSPdpException(String msg, Throwable t) %7B%0D%0A        super(msg, t)
 ;%0D%0A 

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