1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jdiagnose.library;
17
18 import org.jdiagnose.DiagnosticUnit;
19 import org.jdiagnose.DiagnosticException;
20
21 /***
22 * A Diagnostic that always fails. Useful to test what happens when Diagnostics
23 * fail (e.g. if you're sending emails on failure).
24 *
25 * User: jamie
26 * Date: Jun 4, 2004
27 * Time: 7:37:33 PM
28 */
29 public class FailingDiagnostic extends DiagnosticUnit {
30
31 /***
32 * Default Constructor
33 */
34 public FailingDiagnostic() {
35 super();
36 }
37
38 /***
39 * Construct with new fqn
40 * @param name the fully qualified name of this diagnostic
41 */
42 public FailingDiagnostic(String name) {
43 super(name);
44 }
45
46 /***
47 * Diagnose a failure
48 * @throws DiagnosticException always thrown.
49 */
50 public void diagnoseFailure() throws DiagnosticException {
51 throw new DiagnosticException("FailingDiagnostic always fails");
52 }
53 }