Apache Log4cxx  Version 1.3.0
Loading...
Searching...
No Matches
exception.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _LOG4CXX_HELPERS_EXCEPTION_H
19#define _LOG4CXX_HELPERS_EXCEPTION_H
20
21#include <exception>
22#include <log4cxx/log4cxx.h>
23#include <log4cxx/logstring.h>
24
25#ifdef _MSC_VER
26 #pragma warning ( push )
27 #pragma warning (disable : 4275) // ::std::exception needs to have dll-interface
28#endif
29
30namespace LOG4CXX_NS
31{
32namespace helpers
33{
37class LOG4CXX_EXPORT Exception : public ::std::exception
38{
39 public:
40 Exception(const char* msg);
41 Exception(const LogString& msg);
42 Exception(const Exception& src);
44 const char* what() const throw();
45 private:
46 enum { MSG_SIZE = 128 };
47 char msg[MSG_SIZE + 1];
48}; // class Exception
49
54{
55 public:
60 private:
61 static LogString formatMessage(log4cxx_status_t stat);
62}; // class RuntimeException
63
68{
69 public:
73}; // class NullPointerException
74
78{
79 public:
83}; // class IllegalArgumentException
84
90{
91 public:
98 private:
99 static LogString formatMessage(log4cxx_status_t stat);
100 static LogString formatMessage(const LogString& type, log4cxx_status_t stat);
101};
102
104{
105 public:
109 private:
110 static LogString formatMessage(const LogString& key);
111};
112
114{
115 public:
119 private:
120 static LogString formatMessage(log4cxx_status_t stat);
121};
122
123
125{
126 public:
131 private:
132 static LogString formatMessage(log4cxx_status_t stat);
133};
134
136 : public Exception
137{
138 public:
143 private:
144 static LogString formatMessage(log4cxx_status_t stat);
145};
146
148{
149 public:
153 private:
154 static LogString formatMessage(log4cxx_status_t stat);
155};
156
158 : public Exception
159{
160 public:
164};
165
172{
173 public:
177};
178
185{
186 public:
190 private:
191 static LogString formatMessage(const LogString& className);
192};
193
194
196{
197 public:
201};
202
204{
205 public:
209};
210
215{
216 public:
221};
222
228{
229 public:
233};
234
236{
237 public:
241};
242
248{
249 public:
253};
254
262{
263 public:
267};
268
269
277{
278 public:
282};
283
284
285} // namespace helpers
286} // namespace log4cxx
287
288#if defined(_MSC_VER)
289 #pragma warning (pop)
290#endif
291
292#endif // _LOG4CXX_HELPERS_EXCEPTION_H
Signals that an error occurred while attempting to bind a socket to a local address and port.
Definition: exception.h:248
BindException(const BindException &)
BindException & operator=(const BindException &)
BindException(log4cxx_status_t status)
Thrown when an application tries to load in a class through its string name but no definition for the...
Definition: exception.h:185
ClassNotFoundException(const LogString &className)
ClassNotFoundException(const ClassNotFoundException &msg)
ClassNotFoundException & operator=(const ClassNotFoundException &msg)
Definition: exception.h:236
ClosedChannelException(const ClosedChannelException &src)
ClosedChannelException & operator=(const ClosedChannelException &)
Signals that an error occurred while attempting to connect a socket to a remote address and port.
Definition: exception.h:228
ConnectException & operator=(const ConnectException &)
ConnectException(const ConnectException &src)
ConnectException(log4cxx_status_t status)
The class Exception and its subclasses indicate conditions that a reasonable application might want t...
Definition: exception.h:38
Exception(const LogString &msg)
const char * what() const
Exception & operator=(const Exception &src)
Exception(const char *msg)
Exception(const Exception &src)
Signals that an I/O exception of some sort has occurred.
Definition: exception.h:90
IOException(log4cxx_status_t stat)
IOException(const LogString &type, log4cxx_status_t stat)
IOException(const LogString &msg)
IOException(const IOException &src)
IOException & operator=(const IOException &)
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Definition: exception.h:78
IllegalArgumentException(const LogString &msg)
IllegalArgumentException & operator=(const IllegalArgumentException &)
IllegalArgumentException(const IllegalArgumentException &)
IllegalMonitorStateException(const IllegalMonitorStateException &msg)
IllegalMonitorStateException & operator=(const IllegalMonitorStateException &msg)
Definition: exception.h:204
IllegalStateException & operator=(const IllegalStateException &)
IllegalStateException(const IllegalStateException &)
Thrown when an application tries to create an instance of a class using the newInstance method in cla...
Definition: exception.h:172
InstantiationException & operator=(const InstantiationException &msg)
InstantiationException(const InstantiationException &msg)
InstantiationException(const LogString &msg)
Definition: exception.h:125
InterruptedException(const InterruptedException &src)
InterruptedException & operator=(const InterruptedException &)
InterruptedException(log4cxx_status_t stat)
Signals that an I/O operation has been interrupted.
Definition: exception.h:262
InterruptedIOException(const InterruptedIOException &)
InterruptedIOException(const LogString &msg)
InterruptedIOException & operator=(const InterruptedIOException &)
MissingResourceException(const LogString &key)
MissingResourceException & operator=(const MissingResourceException &)
MissingResourceException(const MissingResourceException &src)
Definition: exception.h:196
NoSuchElementException(const NoSuchElementException &)
NoSuchElementException & operator=(const NoSuchElementException &)
Thrown when an application attempts to use null in a case where an object is required.
Definition: exception.h:68
NullPointerException(const LogString &msg)
NullPointerException(const NullPointerException &msg)
NullPointerException & operator=(const NullPointerException &src)
Definition: exception.h:114
PoolException & operator=(const PoolException &)
PoolException(const PoolException &src)
PoolException(log4cxx_status_t stat)
RuntimeException is the parent class of those exceptions that can be thrown during the normal operati...
Definition: exception.h:54
RuntimeException & operator=(const RuntimeException &src)
RuntimeException(const RuntimeException &msg)
RuntimeException(log4cxx_status_t stat)
RuntimeException(const LogString &msg)
Thrown to indicate that there is an error in the underlying protocol, such as a TCP error.
Definition: exception.h:215
SocketException(const SocketException &)
SocketException(log4cxx_status_t status)
SocketException & operator=(const SocketException &)
SocketException(const LogString &msg)
Signals that an I/O operation has been interrupted.
Definition: exception.h:277
SocketTimeoutException(const SocketTimeoutException &)
SocketTimeoutException & operator=(const SocketTimeoutException &)
Definition: exception.h:137
ThreadException(log4cxx_status_t stat)
ThreadException & operator=(const ThreadException &)
ThreadException(const LogString &msg)
ThreadException(const ThreadException &src)
Definition: exception.h:148
TranscoderException(const TranscoderException &src)
TranscoderException(log4cxx_status_t stat)
TranscoderException & operator=(const TranscoderException &)
#define LOG4CXX_EXPORT
Definition: log4cxx.h:101
#define LOG4CXX_NS
Definition: log4cxx.h:104
std::basic_string< logchar > LogString
Definition: logstring.h:60
int log4cxx_status_t
Definition: log4cxx.h:113