Generalize the COPSPdpException class to a COPSException to make upstream exception... 34/19534/2
authorSteven Pisarski <s.pisarski@cablelabs.com>
Mon, 4 May 2015 17:00:15 +0000 (11:00 -0600)
committerThomas Kee <xsited@yahoo.com>
Fri, 8 May 2015 19:52:00 +0000 (12:52 -0700)
Change-Id: Ic57eb4f88b7f6cfc2aa92152326057916ac9552e
Signed-off-by: Steven Pisarski <s.pisarski@cablelabs.com>
packetcable-driver/src/main/java/org/umu/cops/ospdp/COPSPdpException.java

index 9375888f445ffa34450d1b37c42c4f3e1d1cae98..3aad574e6de64b335234e2956fd9f01340ffdd44 100644 (file)
@@ -6,42 +6,40 @@
 \r
 package org.umu.cops.ospdp;\r
 \r
+import org.umu.cops.stack.COPSException;\r
+\r
 /**\r
  * COPS PEP Exception\r
  *\r
  * @version COPSPepException.java, v 2.00 2004\r
  *\r
  */\r
-public class COPSPdpException extends Exception {\r
-\r
-    private int rc;\r
-    final static int GENERAL_ERROR = 0x00000001;\r
+public class COPSPdpException extends COPSException {\r
 \r
     /**\r
      * Creates a <tt>COPSPdpException</tt> with the given message.\r
-     * @param msg     Exception message\r
+     * @param msg    Exception message\r
      */\r
     public COPSPdpException(String msg) {\r
         super(msg);\r
-        rc=0;\r
     }\r
 \r
     /**\r
      * Creates a <tt>COPSPdpException</tt> with the given message and return code.\r
-     * @param msg     Exception message\r
-     * @param retCode     Return code\r
+     * @param msg       Exception message\r
+     * @param retCode   Return code\r
      */\r
     public COPSPdpException(String msg, int retCode) {\r
-        super(msg);\r
-        rc = retCode;\r
+        super(msg, retCode);\r
     }\r
 \r
     /**\r
-     * Gets the return code of the exception\r
-     * @return   Exception's return code\r
+     * Creates a <tt>COPSPdpException</tt> with the given message and throwable.\r
+     * @param msg       Exception message\r
+     * @param t         the Throwable\r
      */\r
-    public int returnCode() {\r
-        return rc;\r
+    public COPSPdpException(String msg, Throwable t) {\r
+        super(msg, t);\r
     }\r
 \r
 }\r