Fixed building of models, moved code into directory structure.
[packetcable.git] / protocol_plugins.packetcable / src / main / java / org / umu / cops / prpdp / COPSPdpException.java
diff --git a/protocol_plugins.packetcable/src/main/java/org/umu/cops/prpdp/COPSPdpException.java b/protocol_plugins.packetcable/src/main/java/org/umu/cops/prpdp/COPSPdpException.java
new file mode 100644 (file)
index 0000000..fc4c74d
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ * Copyright (c) 2004 University of Murcia.  All rights reserved.\r
+ * --------------------------------------------------------------\r
+ * For more information, please see <http://www.umu.euro6ix.org/>.\r
+ */\r
+\r
+package org.umu.cops.prpdp;\r
+\r
+/**\r
+ * Exception class for PDP errors\r
+ *\r
+ * @version COPSPdpException.java, v 2.00 2004\r
+ *\r
+ */\r
+\r
+public class COPSPdpException extends Exception {\r
+\r
+    private int rc;\r
+    final static int GENERAL_ERROR = 0x00000001;\r
+\r
+    /**\r
+    * Creates a <tt>COPSPdpException</tt> with the given 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
+     */\r
+    public COPSPdpException(String msg, int retCode) {\r
+        super(msg);\r
+        rc = retCode;\r
+    }\r
+\r
+    /**\r
+     * Gets the return code of the exception\r
+     * @return    Exception's return code\r
+     */\r
+    public int returnCode() {\r
+        return rc;\r
+    }\r
+\r
+}\r