1 /**
2 * AUTOHIT 2003
3 * Copyright Erich P Gatejen (c) 1989,1997,2003,2004
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Additional license information can be found in the documentation.
19 * @author Erich P Gatejen
20 */
21 package autohit.server;
22
23 import autohit.common.AutohitException;
24
25 /**
26 * A Server exception. A numeric error number can be set.
27 * The default is SE_GENERIC.
28 *
29 * @author Erich P. Gatejen
30 * @version 1.0
31 * <i>Version History</i>
32 * <code>EPG - Initial - 25Apr03<br>
33 * EPG - Add exception chaining - 13Jun03</code>
34 *
35 */
36 public class ServerException extends AutohitException {
37
38 final static long serialVersionUID = 1;
39
40 /**
41 * Default Constructor.
42 */
43 public ServerException() {
44 super("Generic ServerException", CODE_SERVER_ERROR);
45 }
46
47 /**
48 * Message constructor
49 * @param message text message for exception
50 */
51 public ServerException(String message) {
52 super(message, CODE_SERVER_ERROR);
53 }
54
55 /**
56 * Message constructor
57 * @param n numeric error
58 */
59 public ServerException(int n) {
60 super("Generic ServerException", n);
61 }
62
63 /**
64 * Message constructor
65 * @param message text message for exception
66 * @param n numeric error
67 */
68 public ServerException(String message, int n) {
69 super(message, n);
70 }
71
72 /**
73 * Message constructor with cause
74 * @param message text message for exception
75 * @param theCause for exception chaining
76 */
77 public ServerException(String message, Throwable theCause) {
78 super(message, CODE_SERVER_ERROR);
79 }
80
81 /**
82 * Message constructor with cause
83 * @param n numeric error
84 * @param theCause for exception chaining
85 */
86 public ServerException(int n, Throwable theCause) {
87 super("Generic ServerException", n);
88 }
89
90 /**
91 * Message constructor with cause
92 * @param message text message for exception
93 * @param n numeric error
94 * @param theCause for exception chaining
95 */
96 public ServerException(String message, int n, Throwable theCause) {
97 super(message, n, theCause);
98 numeric = n;
99 }
100 }
|