fc4c74d45c1a60a17faae24da95b034d4c6a7302
[packetcable.git] / protocol_plugins.packetcable / src / main / java / org / umu / cops / prpdp / COPSPdpException.java
1 /*\r
2  * Copyright (c) 2004 University of Murcia.  All rights reserved.\r
3  * --------------------------------------------------------------\r
4  * For more information, please see <http://www.umu.euro6ix.org/>.\r
5  */\r
6 \r
7 package org.umu.cops.prpdp;\r
8 \r
9 /**\r
10  * Exception class for PDP errors\r
11  *\r
12  * @version COPSPdpException.java, v 2.00 2004\r
13  *\r
14  */\r
15 \r
16 public class COPSPdpException extends Exception {\r
17 \r
18     private int rc;\r
19     final static int GENERAL_ERROR = 0x00000001;\r
20 \r
21     /**\r
22     * Creates a <tt>COPSPdpException</tt> with the given message.\r
23     * @param msg    Exception message\r
24     */\r
25     public COPSPdpException(String msg) {\r
26         super(msg);\r
27         rc=0;\r
28     }\r
29 \r
30     /**\r
31      * Creates a <tt>COPSPdpException</tt> with the given message and return code.\r
32      * @param msg       Exception message\r
33      * @param retCode   Return code\r
34      */\r
35     public COPSPdpException(String msg, int retCode) {\r
36         super(msg);\r
37         rc = retCode;\r
38     }\r
39 \r
40     /**\r
41      * Gets the return code of the exception\r
42      * @return    Exception's return code\r
43      */\r
44     public int returnCode() {\r
45         return rc;\r
46     }\r
47 \r
48 }\r