View Javadoc

1   /*
2    * Copyright 2001-2004 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  package org.jdiagnose;
17  
18  import org.jdiagnose.exception.NestableRuntimeException;
19  
20  /***
21   * Used by DiagnosticUnit's assert* methods to indicate that an 
22   * Assertion has failed.
23   * User: jamie
24   * Date: May 29, 2004
25   * Time: 10:32:17 PM
26   */
27  public class DiagnosticAssertionException extends NestableRuntimeException {
28      
29      /***
30       * Construct an empty exception
31       */
32      public DiagnosticAssertionException() {
33      }
34  
35      /***
36       * Construct an exception with a message
37       * @param message the message
38       */
39      public DiagnosticAssertionException(String message) {
40          super(message);
41      }
42  
43      /***
44       * Construct an exception with a message and nested throwable
45       * @param message information about this exception
46       * @param throwable a nested exception
47       */
48      public DiagnosticAssertionException(String message, Throwable throwable) {
49          super(message, throwable);
50      }
51  
52      /***
53       * Construct an exception with a nested throwable. The nested throwables
54       * exception's message is used as this exceptions message.
55       * @param throwable a nested exception
56       */
57      public DiagnosticAssertionException(Throwable throwable) {
58          super(throwable);
59      }
60  
61  }