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 * Create a <code>TestFailedException</code> with a detail message.
34 *
35 * @param message A detail message for this <code>TestFailedException</code>, or
36 * <code>null</code>. If <code>null</code> is passed, the <code>getMessage</code>
37 * method will return an empty <code>String</code>.
38 */
39 public TestSetFailedException( String message )
40 {
41 super( message );
42 }
43
44 /**
45 * Create a <code>TestFailedException</code> with the specified detail
46 * message and cause.
47 * <p/>
48 * <p>Note that the detail message associated with cause is
49 * <em>not</em> automatically incorporated in this throwable's detail
50 * message.
51 *
52 * @param message A detail message for this <code>TestFailedException</code>, or <code>null</code>.
53 * @param cause the cause, which is saved for later retrieval by the <code>getCause</code> 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 * Create a <code>TestFailedException</code> with the specified cause. The
63 * <code>getMessage</code> method of this exception object will return
64 * <code>(cause == null ? "" : cause.toString())</code>.
65 *
66 * @param cause The cause
67 */
68 public TestSetFailedException( Throwable cause )
69 {
70 super( cause == null ? "" : cause.toString(), cause );
71 }
72 }