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  
18  package org.apache.jdo.impl.enhancer.meta;
19  
20  
21  /***
22   * Thrown to indicate that an access to JDO meta-data failed due to a
23   * serious error, which might have left the meta-data component in an
24   * inconsistent state.
25   */
26  public class EnhancerMetaDataFatalError
27      //^olsen: provisional, convert to a checked exception
28      extends RuntimeException
29  {
30      /***
31       * An optional nested exception.
32       */
33      public final Throwable nested;
34  
35      /***
36       * Constructs an <code>EnhancerMetaDataFatalError</code> with no detail message.
37       */
38      public EnhancerMetaDataFatalError()
39      {
40          this.nested = null;
41      }
42  
43      /***
44       * Constructs an <code>EnhancerMetaDataFatalError</code> with the specified
45       * detail message.
46       */
47      public EnhancerMetaDataFatalError(String msg)
48      {
49          super(msg);
50          this.nested = null;
51      }
52  
53      /***
54       * Constructs an <code>EnhancerMetaDataFatalError</code> with an optional
55       * nested exception.
56       */
57      public EnhancerMetaDataFatalError(Throwable nested)
58      {
59          super(nested.toString());
60          this.nested = nested;
61      }
62  
63      /***
64       * Constructs an <code>EnhancerMetaDataFatalError</code> with the specified
65       * detail message and an optional nested exception.
66       */
67      public EnhancerMetaDataFatalError(String msg, Throwable nested)
68      {
69          super(msg);
70          this.nested = nested;
71      }
72  }