View Javadoc

1   /*
2    * Copyright 2005 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at 
7    * 
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software 
11   * distributed under the License is distributed on an "AS IS" BASIS, 
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
13   * See the License for the specific language governing permissions and 
14   * limitations under the License.
15   */
16  
17  package org.apache.jdo.impl.enhancer;
18  
19  
20  /***
21   * Thrown to indicate that the class-file enhancer failed to perform an
22   * operation due to a serious error.  The enhancer is not guaranteed to
23   * be in a consistent state anymore.
24   */
25  public class EnhancerFatalError
26      extends Exception
27  {
28      /***
29       * An optional nested exception.
30       */
31      public final Throwable nested;
32  
33      /***
34       * Constructs an <code>EnhancerFatalError</code> with no detail message.
35       */
36      public EnhancerFatalError()
37      {
38          this.nested = null;
39      }
40  
41      /***
42       * Constructs an <code>EnhancerFatalError</code> with the specified
43       * detail message.
44       */
45      public EnhancerFatalError(String msg)
46      {
47          super(msg);
48          this.nested = null;
49      }
50  
51      /***
52       * Constructs an <code>EnhancerFatalError</code> with an optional
53       * nested exception.
54       */
55      public EnhancerFatalError(Throwable nested)
56      {
57          super(nested.toString());
58          this.nested = nested;
59      }
60  
61      /***
62       * Constructs an <code>EnhancerFatalError</code> with the specified
63       * detail message and an optional nested exception.
64       */
65      public EnhancerFatalError(String msg, Throwable nested)
66      {
67          super(msg);
68          this.nested = nested;
69      }
70  }