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
17package 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 * @deprecated Please use {@link java.net.URL#openConnection} instead.
29 *     Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
30 *     for further details.
31 */
32
33@Deprecated
34public class LogConfigurationException extends RuntimeException {
35
36
37    /**
38     * Construct a new exception with <code>null</code> as its detail message.
39     */
40    public LogConfigurationException() {
41
42        super();
43
44    }
45
46
47    /**
48     * Construct a new exception with the specified detail message.
49     *
50     * @param message The detail message
51     */
52    public LogConfigurationException(String message) {
53
54        super(message);
55
56    }
57
58
59    /**
60     * Construct a new exception with the specified cause and a derived
61     * detail message.
62     *
63     * @param cause The underlying cause
64     */
65    public LogConfigurationException(Throwable cause) {
66
67        this((cause == null) ? null : cause.toString(), cause);
68
69    }
70
71
72    /**
73     * Construct a new exception with the specified detail message and cause.
74     *
75     * @param message The detail message
76     * @param cause The underlying cause
77     */
78    public LogConfigurationException(String message, Throwable cause) {
79
80        super(message + " (Caused by " + cause + ")");
81        this.cause = cause; // Two-argument version requires JDK 1.4 or later
82
83    }
84
85
86    /**
87     * The underlying cause of this exception.
88     */
89    protected Throwable cause = null;
90
91
92    /**
93     * Return the underlying cause of this exception (if any).
94     */
95    public Throwable getCause() {
96
97        return (this.cause);
98
99    }
100
101
102}
103