From 4e2f4bb9e92056dd34d1795ee0fd437109c61ce9 Mon Sep 17 00:00:00 2001 From: Steven Pisarski Date: Mon, 4 May 2015 11:00:15 -0600 Subject: [PATCH] Generalize the COPSPdpException class to a COPSException to make upstream exception handling easier. Change-Id: Ic57eb4f88b7f6cfc2aa92152326057916ac9552e Signed-off-by: Steven Pisarski --- .../org/umu/cops/ospdp/COPSPdpException.java | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/packetcable-driver/src/main/java/org/umu/cops/ospdp/COPSPdpException.java b/packetcable-driver/src/main/java/org/umu/cops/ospdp/COPSPdpException.java index 9375888..3aad574 100644 --- a/packetcable-driver/src/main/java/org/umu/cops/ospdp/COPSPdpException.java +++ b/packetcable-driver/src/main/java/org/umu/cops/ospdp/COPSPdpException.java @@ -6,42 +6,40 @@ package org.umu.cops.ospdp; +import org.umu.cops.stack.COPSException; + /** * COPS PEP Exception * * @version COPSPepException.java, v 2.00 2004 * */ -public class COPSPdpException extends Exception { - - private int rc; - final static int GENERAL_ERROR = 0x00000001; +public class COPSPdpException extends COPSException { /** * Creates a COPSPdpException with the given message. - * @param msg Exception message + * @param msg Exception message */ public COPSPdpException(String msg) { super(msg); - rc=0; } /** * Creates a COPSPdpException with the given message and return code. - * @param msg Exception message - * @param retCode Return code + * @param msg Exception message + * @param retCode Return code */ public COPSPdpException(String msg, int retCode) { - super(msg); - rc = retCode; + super(msg, retCode); } /** - * Gets the return code of the exception - * @return Exception's return code + * Creates a COPSPdpException with the given message and throwable. + * @param msg Exception message + * @param t the Throwable */ - public int returnCode() { - return rc; + public COPSPdpException(String msg, Throwable t) { + super(msg, t); } } -- 2.36.6