Refactor classes designed to hold data to be more immutable, and reducing the probabi...
[packetcable.git] / packetcable-driver / src / main / java / org / umu / cops / ospep / COPSPepException.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.ospep;\r
8 \r
9 /**\r
10  * COPS PEP Exception\r
11  *\r
12  * @version COPSPepException.java, v 2.00 2004\r
13  *\r
14  */\r
15 public class COPSPepException extends Exception {\r
16 \r
17     private int rc;\r
18     final static int GENERAL_ERROR = 0x00000001;\r
19 \r
20     /**\r
21      * Creates a <tt>COPSPdpException</tt> with the given message.\r
22      * @param msg    Exception message\r
23      */\r
24 \r
25     public COPSPepException(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 COPSPepException(String msg, int retCode) {\r
36         super(msg);\r
37         rc = retCode;\r
38     }\r
39 \r
40     /**\r
41      * Returns the return code of the exception\r
42      *\r
43      * @return   Exception's return code\r
44      *\r
45      */\r
46     public int returnCode() {\r
47         return rc;\r
48     }\r
49 \r
50 }\r