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.vm;
22
23 import autohit.common.AutohitException;
24
25 /**
26 * A VM exception. The specific error is given in the numeric
27 * field.
28 *
29 * @author Erich P. Gatejen
30 * @version 1.0
31 * <i>Version History</i>
32 * <code>EPG - Rewrite - 5May03<br>
33 * EPG - Exception chaingin - 13Jun03<br>
34 * EPG - New fault and error system - 21Jul03</code>
35 *
36 */
37 public class VMException extends AutohitException {
38
39 final static long serialVersionUID = 1;
40
41 /**
42 * Numeric values for the exception.
43 */
44
45
46 /**
47 * Default Constructor.
48 */
49 public VMException() {
50 super("Generic VMException", CODE_VM_GENERIC_ERROR);
51 }
52
53 /**
54 * Message constructor
55 * @param message text message for exception
56 */
57 public VMException(String message) {
58 super(message, CODE_VM_GENERIC_ERROR);
59 }
60
61 /**
62 * Message constructor
63 * @param n numeric error
64 */
65 public VMException(int n) {
66 super("Generic VMException", n);
67 }
68
69 /**
70 * Message constructor
71 * @param message text message for exception
72 * @param n numeric error
73 */
74 public VMException(String message, int n) {
75 super(message, n);
76 }
77
78 /**
79 * Message constructor with cause
80 * @param message text message for exception
81 * @param theCause for exception chaining
82 */
83 public VMException(String message, Throwable theCause) {
84 super(message, CODE_VM_GENERIC_ERROR);
85 }
86
87 /**
88 * Message constructor with cause
89 * @param n numeric error
90 * @param theCause for exception chaining
91 */
92 public VMException(int n, Throwable theCause) {
93 super("Generic VMException", n);
94 }
95
96 /**
97 * Message constructor with cause
98 * @param message text message for exception
99 * @param n numeric error
100 * @param theCause for exception chaining
101 */
102 public VMException(String message, int n, Throwable theCause) {
103 super(message, n, theCause);
104 numeric = n;
105 }
106 }
|