View Javadoc
1   package org.apache.maven.surefire.testset;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  
23  /**
24   * Exception that indicates a test failed.
25   *
26   * @author Bill Venners
27   */
28  public class TestSetFailedException
29      extends Exception
30  {
31  
32      /**
33       * Creates {@code TestSetFailedException} with a detail message.
34       *
35       * @param message A detail message for this {@code TestSetFailedException}, or
36       *                {@code null}. If {@code null} is passed, the {@link #getMessage}
37       *                method will return an empty {@link String string}.
38       */
39      public TestSetFailedException( String message )
40      {
41          super( message );
42      }
43  
44      /**
45       * Creates {@code TestSetFailedException} with the specified detail
46       * message and cause.
47       * <br>
48       * <p>Note that the detail message associated with cause is
49       * <b>NOT</b> automatically incorporated in this throwable's detail
50       * message.
51       *
52       * @param message A detail message for this {@code TestSetFailedException}, or {@code null}.
53       * @param cause   the cause, which is saved for later retrieval by the {@link #getCause} method.
54       *                (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
55       */
56      public TestSetFailedException( String message, Throwable cause )
57      {
58          super( message, cause );
59      }
60  
61      /**
62       * Creates {@code TestSetFailedException} with the specified cause. The mthod {@link #getMessage} method of this
63       * exception object will return {@code cause == null ? "" : cause.toString()}.
64       *
65       * @param cause The cause
66       */
67      public TestSetFailedException( Throwable cause )
68      {
69          super( cause == null ? "" : cause.toString(), cause );
70      }
71  }