1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.logging;
18
19
20 /***
21 * <p>An exception that is thrown only if a suitable <code>LogFactory</code>
22 * or <code>Log</code> instance cannot be created by the corresponding
23 * factory methods.</p>
24 *
25 * @author Craig R. McClanahan
26 * @version $Revision: 155426 $ $Date: 2005-02-26 13:10:49 +0000 (Sat, 26 Feb 2005) $
27 */
28
29 public class LogConfigurationException extends RuntimeException {
30
31
32 /***
33 * Construct a new exception with <code>null</code> as its detail message.
34 */
35 public LogConfigurationException() {
36
37 super();
38
39 }
40
41
42 /***
43 * Construct a new exception with the specified detail message.
44 *
45 * @param message The detail message
46 */
47 public LogConfigurationException(String message) {
48
49 super(message);
50
51 }
52
53
54 /***
55 * Construct a new exception with the specified cause and a derived
56 * detail message.
57 *
58 * @param cause The underlying cause
59 */
60 public LogConfigurationException(Throwable cause) {
61
62 this((cause == null) ? null : cause.toString(), cause);
63
64 }
65
66
67 /***
68 * Construct a new exception with the specified detail message and cause.
69 *
70 * @param message The detail message
71 * @param cause The underlying cause
72 */
73 public LogConfigurationException(String message, Throwable cause) {
74
75 super(message + " (Caused by " + cause + ")");
76 this.cause = cause;
77
78 }
79
80
81 /***
82 * The underlying cause of this exception.
83 */
84 protected Throwable cause = null;
85
86
87 /***
88 * Return the underlying cause of this exception (if any).
89 */
90 public Throwable getCause() {
91
92 return (this.cause);
93
94 }
95
96
97 }