01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package javax.management;
09:
10: /**
11: * When a <CODE>java.lang.Error</CODE> occurs in the agent it should be caught and
12: * re-thrown as a <CODE>RuntimeErrorException</CODE>.
13: *
14: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
15: */
16:
17: public class RuntimeErrorException extends JMRuntimeException {
18:
19: /**
20: * Th encapsulated Error
21: */
22: private java.lang.Error error;
23:
24: /**
25: * Default constructor.
26: */
27: public RuntimeErrorException(java.lang.Error e) {
28: super ();
29: error = e;
30: }
31:
32: /**
33: * Constructor that allows a specific error message to be specified.
34: */
35: public RuntimeErrorException(java.lang.Error e, String message) {
36: super (message);
37: error = e;
38: }
39:
40: /**
41: * Returns the actual <CODE>java.lang.Error</CODE> thrown.
42: */
43: public java.lang.Error getTargetError() {
44: return error;
45: }
46:
47: }
|