Apache Log4cxx
Version 2.0.0
Toggle main menu visibility
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
#include <string>
25
26
#ifdef _MSC_VER
27
#pragma warning ( push )
28
#pragma warning (disable : 4275)
// ::std::exception needs to have dll-interface
29
#pragma warning (disable : 4251)
// ::std::basic_string needs to have dll-interface
30
#endif
31
32
namespace
LOG4CXX_NS
33
{
34
namespace
helpers
35
{
39
class
LOG4CXX_EXPORT
Exception
:
public
::std::exception
40
{
41
public
:
42
Exception
(
const
char
* msg);
43
Exception
(
const
LogString
& msg);
44
const
char
*
what
() const noexcept override;
45
static
LogString
makeMessage
(const
LogString
& type, log4cxx_status_t stat);
46
#if !LOG4CXX_LOGCHAR_IS_UTF8
47
static
std::string
makeMessage
(
const
char
* type, log4cxx_status_t stat);
48
#endif
49
private
:
50
std::string msg;
51
};
// class Exception
52
56
class
LOG4CXX_EXPORT
RuntimeException
:
public
Exception
57
{
58
public
:
59
RuntimeException
(log4cxx_status_t stat);
60
RuntimeException
(
const
LogString
& msg);
61
private
:
62
static
LogString
formatMessage(log4cxx_status_t stat);
63
};
// class RuntimeException
64
68
class
LOG4CXX_EXPORT
NullPointerException
:
public
RuntimeException
69
{
70
public
:
71
NullPointerException
(
const
LogString
& msg);
72
};
// class NullPointerException
73
76
class
LOG4CXX_EXPORT
IllegalArgumentException
:
public
RuntimeException
77
{
78
public
:
79
IllegalArgumentException
(
const
LogString
& msg);
80
};
// class IllegalArgumentException
81
86
class
LOG4CXX_EXPORT
IOException
:
public
Exception
87
{
88
public
:
89
IOException
();
90
IOException
(log4cxx_status_t stat);
91
IOException
(
const
LogString
& msg);
92
IOException
(
const
char
* msg);
93
IOException
(
const
LogString
& type, log4cxx_status_t stat);
94
#if !LOG4CXX_LOGCHAR_IS_UTF8
95
IOException
(
const
char
* msg, log4cxx_status_t stat);
96
#endif
97
private
:
98
static
LogString
formatMessage(log4cxx_status_t stat);
99
};
100
101
class
LOG4CXX_EXPORT
SubProcessFailure
:
public
Exception
102
{
103
public
:
104
SubProcessFailure
(
const
LogString
& processName,
int
exitCode,
int
exitWhy);
105
#if !LOG4CXX_LOGCHAR_IS_UTF8
106
SubProcessFailure
(
const
char
* processName,
int
exitCode,
int
exitWhy);
107
#endif
108
static
LogString
makeMessage
(
const
LogString
& processName,
int
exitCode,
int
exitWhy);
109
};
110
111
class
LOG4CXX_EXPORT
MissingResourceException
:
public
Exception
112
{
113
public
:
114
MissingResourceException
(
const
LogString
& key);
115
private
:
116
static
LogString
formatMessage(
const
LogString
& key);
117
};
118
119
class
LOG4CXX_EXPORT
PoolException
:
public
Exception
120
{
121
public
:
122
PoolException
(log4cxx_status_t stat);
123
private
:
124
static
LogString
formatMessage(log4cxx_status_t stat);
125
};
126
132
class
LOG4CXX_EXPORT
InstantiationException
:
public
Exception
133
{
134
public
:
135
InstantiationException
(
const
LogString
& msg);
136
};
137
143
class
LOG4CXX_EXPORT
ClassNotFoundException
:
public
Exception
144
{
145
public
:
146
ClassNotFoundException
(
const
LogString
& className);
147
private
:
148
static
LogString
formatMessage(
const
LogString
& className);
149
};
150
151
152
class
LOG4CXX_EXPORT
NoSuchElementException
:
public
Exception
153
{
154
public
:
155
NoSuchElementException
();
156
};
157
158
class
LOG4CXX_EXPORT
IllegalStateException
:
public
Exception
159
{
160
public
:
161
IllegalStateException
();
162
};
163
167
class
LOG4CXX_EXPORT
SocketException
:
public
IOException
168
{
169
public
:
170
SocketException
(
const
LogString
& msg);
171
SocketException
(log4cxx_status_t status);
172
};
173
178
class
LOG4CXX_EXPORT
ConnectException
:
public
SocketException
179
{
180
public
:
181
ConnectException
(
const
LogString
& msg);
182
ConnectException
(log4cxx_status_t status);
183
};
184
185
class
LOG4CXX_EXPORT
ClosedChannelException
:
public
SocketException
186
{
187
public
:
188
ClosedChannelException
();
189
};
190
195
class
LOG4CXX_EXPORT
BindException
:
public
SocketException
196
{
197
public
:
198
BindException
(log4cxx_status_t status);
199
};
200
207
class
LOG4CXX_EXPORT
InterruptedIOException
:
public
IOException
208
{
209
public
:
210
InterruptedIOException
(
const
LogString
& msg);
211
};
212
213
220
class
LOG4CXX_EXPORT
SocketTimeoutException
:
public
InterruptedIOException
221
{
222
public
:
223
SocketTimeoutException
();
224
};
225
226
227
}
// namespace helpers
228
}
// namespace log4cxx
229
230
#if defined(_MSC_VER)
231
#pragma warning (pop)
232
#endif
233
234
#endif
// _LOG4CXX_HELPERS_EXCEPTION_H
log4cxx::helpers::BindException::BindException
BindException(log4cxx_status_t status)
log4cxx::helpers::ClassNotFoundException::ClassNotFoundException
ClassNotFoundException(const LogString &className)
log4cxx::helpers::ClosedChannelException::ClosedChannelException
ClosedChannelException()
log4cxx::helpers::ConnectException::ConnectException
ConnectException(const LogString &msg)
log4cxx::helpers::ConnectException::ConnectException
ConnectException(log4cxx_status_t status)
log4cxx::helpers::Exception::Exception
Exception(const LogString &msg)
log4cxx::helpers::Exception::makeMessage
static LogString makeMessage(const LogString &type, log4cxx_status_t stat)
log4cxx::helpers::Exception::makeMessage
static std::string makeMessage(const char *type, log4cxx_status_t stat)
log4cxx::helpers::Exception::Exception
Exception(const char *msg)
log4cxx::helpers::Exception::what
const char * what() const noexcept override
log4cxx::helpers::IOException::IOException
IOException(const char *msg)
log4cxx::helpers::IOException::IOException
IOException(log4cxx_status_t stat)
log4cxx::helpers::IOException::IOException
IOException(const char *msg, log4cxx_status_t stat)
log4cxx::helpers::IOException::IOException
IOException(const LogString &type, log4cxx_status_t stat)
log4cxx::helpers::IOException::IOException
IOException()
log4cxx::helpers::IOException::IOException
IOException(const LogString &msg)
log4cxx::helpers::IllegalArgumentException::IllegalArgumentException
IllegalArgumentException(const LogString &msg)
log4cxx::helpers::IllegalStateException::IllegalStateException
IllegalStateException()
log4cxx::helpers::InstantiationException::InstantiationException
InstantiationException(const LogString &msg)
log4cxx::helpers::InterruptedIOException::InterruptedIOException
InterruptedIOException(const LogString &msg)
log4cxx::helpers::MissingResourceException::MissingResourceException
MissingResourceException(const LogString &key)
log4cxx::helpers::NoSuchElementException::NoSuchElementException
NoSuchElementException()
log4cxx::helpers::NullPointerException::NullPointerException
NullPointerException(const LogString &msg)
log4cxx::helpers::PoolException::PoolException
PoolException(log4cxx_status_t stat)
log4cxx::helpers::RuntimeException::RuntimeException
RuntimeException(log4cxx_status_t stat)
log4cxx::helpers::RuntimeException::RuntimeException
RuntimeException(const LogString &msg)
log4cxx::helpers::SocketException::SocketException
SocketException(log4cxx_status_t status)
log4cxx::helpers::SocketException::SocketException
SocketException(const LogString &msg)
log4cxx::helpers::SocketTimeoutException::SocketTimeoutException
SocketTimeoutException()
log4cxx::helpers::SubProcessFailure::makeMessage
static LogString makeMessage(const LogString &processName, int exitCode, int exitWhy)
log4cxx::helpers::SubProcessFailure::SubProcessFailure
SubProcessFailure(const LogString &processName, int exitCode, int exitWhy)
log4cxx::helpers::SubProcessFailure::SubProcessFailure
SubProcessFailure(const char *processName, int exitCode, int exitWhy)
logstring.h
log4cxx::LogString
std::basic_string< logchar > LogString
Definition
logstring.h:51
src
main
include
log4cxx
helpers
exception.h
Generated by
1.18.0 on
SITE_PUBLISHED_DATE
Copyright © 2017-2026
Apache Software Foundation
. Apache, Chainsaw, log4cxx, Log4j, Log4net, log4php and the Apache logo are
trademarks or registered trademarks
of The Apache Software Foundation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Privacy Policy
.