/usr/include/log4cxx/helpers/exception.h is in liblog4cxx-dev 0.10.0-12.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _LOG4CXX_HELPERS_EXCEPTION_H
#define _LOG4CXX_HELPERS_EXCEPTION_H
#include <exception>
#include <log4cxx/log4cxx.h>
#include <log4cxx/logstring.h>
namespace log4cxx
{
namespace helpers
{
/** The class Exception and its subclasses indicate conditions that a
reasonable application might want to catch.
*/
class LOG4CXX_EXPORT Exception : public ::std::exception
{
public:
Exception(const char* msg);
Exception(const LogString& msg);
Exception(const Exception& src);
Exception& operator=(const Exception& src);
const char* what() const throw();
private:
enum { MSG_SIZE = 128 };
char msg[MSG_SIZE + 1];
}; // class Exception
/** RuntimeException is the parent class of those exceptions that can be
thrown during the normal operation of the process.
*/
class LOG4CXX_EXPORT RuntimeException : public Exception
{
public:
RuntimeException(log4cxx_status_t stat);
RuntimeException(const LogString& msg);
RuntimeException(const RuntimeException& msg);
RuntimeException& operator=(const RuntimeException& src);
private:
static LogString formatMessage(log4cxx_status_t stat);
}; // class RuntimeException
/** Thrown when an application attempts to use null in a case where an
object is required.
*/
class LOG4CXX_EXPORT NullPointerException : public RuntimeException
{
public:
NullPointerException(const LogString& msg);
NullPointerException(const NullPointerException& msg);
NullPointerException& operator=(const NullPointerException& src);
}; // class NullPointerException
/** Thrown to indicate that a method has been passed
an illegal or inappropriate argument.*/
class LOG4CXX_EXPORT IllegalArgumentException : public RuntimeException
{
public:
IllegalArgumentException(const LogString& msg);
IllegalArgumentException(const IllegalArgumentException&);
IllegalArgumentException& operator=(const IllegalArgumentException&);
}; // class IllegalArgumentException
/** Signals that an I/O exception of some sort has occurred. This class
is the general class of exceptions produced by failed or interrupted
I/O operations.
*/
class LOG4CXX_EXPORT IOException : public Exception
{
public:
IOException();
IOException(log4cxx_status_t stat);
IOException(const LogString& msg);
IOException(const IOException &src);
IOException& operator=(const IOException&);
private:
static LogString formatMessage(log4cxx_status_t stat);
};
class LOG4CXX_EXPORT MissingResourceException : public Exception
{
public:
MissingResourceException(const LogString& key);
MissingResourceException(const MissingResourceException &src);
MissingResourceException& operator=(const MissingResourceException&);
private:
static LogString formatMessage(const LogString& key);
};
class LOG4CXX_EXPORT PoolException : public Exception
{
public:
PoolException(log4cxx_status_t stat);
PoolException(const PoolException &src);
PoolException& operator=(const PoolException&);
private:
static LogString formatMessage(log4cxx_status_t stat);
};
class LOG4CXX_EXPORT MutexException : public Exception
{
public:
MutexException(log4cxx_status_t stat);
MutexException(const MutexException &src);
MutexException& operator=(const MutexException&);
private:
static LogString formatMessage(log4cxx_status_t stat);
};
class LOG4CXX_EXPORT InterruptedException : public Exception
{
public:
InterruptedException();
InterruptedException(log4cxx_status_t stat);
InterruptedException(const InterruptedException &src);
InterruptedException& operator=(const InterruptedException&);
private:
static LogString formatMessage(log4cxx_status_t stat);
};
class LOG4CXX_EXPORT ThreadException
: public Exception {
public:
ThreadException(log4cxx_status_t stat);
ThreadException(const LogString& msg);
ThreadException(const ThreadException &src);
ThreadException& operator=(const ThreadException&);
private:
static LogString formatMessage(log4cxx_status_t stat);
};
class LOG4CXX_EXPORT TranscoderException : public Exception
{
public:
TranscoderException(log4cxx_status_t stat);
TranscoderException(const TranscoderException &src);
TranscoderException& operator=(const TranscoderException&);
private:
static LogString formatMessage(log4cxx_status_t stat);
};
class LOG4CXX_EXPORT IllegalMonitorStateException
: public Exception {
public:
IllegalMonitorStateException(const LogString& msg);
IllegalMonitorStateException(const IllegalMonitorStateException& msg);
IllegalMonitorStateException& operator=(const IllegalMonitorStateException& msg);
};
/**
Thrown when an application tries to create an instance of a class using
the newInstance method in class Class, but the specified class object
cannot be instantiated because it is an interface or is an abstract class.
*/
class LOG4CXX_EXPORT InstantiationException : public Exception
{
public:
InstantiationException(const LogString& msg);
InstantiationException(const InstantiationException& msg);
InstantiationException& operator=(const InstantiationException& msg);
};
/**
Thrown when an application tries to load in a class through its
string name but no definition for the class with the specified name
could be found.
*/
class LOG4CXX_EXPORT ClassNotFoundException : public Exception
{
public:
ClassNotFoundException(const LogString& className);
ClassNotFoundException(const ClassNotFoundException& msg);
ClassNotFoundException& operator=(const ClassNotFoundException& msg);
private:
static LogString formatMessage(const LogString& className);
};
class NoSuchElementException : public Exception {
public:
NoSuchElementException();
NoSuchElementException(const NoSuchElementException&);
NoSuchElementException& operator=(const NoSuchElementException&);
};
class IllegalStateException : public Exception {
public:
IllegalStateException();
IllegalStateException(const IllegalStateException&);
IllegalStateException& operator=(const IllegalStateException&);
};
/** Thrown to indicate that there is an error in the underlying
protocol, such as a TCP error.
*/
class LOG4CXX_EXPORT SocketException : public IOException
{
public:
SocketException(const LogString& msg);
SocketException(log4cxx_status_t status);
SocketException(const SocketException&);
SocketException& operator=(const SocketException&);
};
/** Signals that an error occurred while attempting to connect a socket
to a remote address and port. Typically, the connection was refused
remotely (e.g., no process is listening on the remote address/port).
*/
class LOG4CXX_EXPORT ConnectException : public SocketException
{
public:
ConnectException(log4cxx_status_t status);
ConnectException(const ConnectException& src);
ConnectException& operator=(const ConnectException&);
};
class LOG4CXX_EXPORT ClosedChannelException : public SocketException
{
public:
ClosedChannelException();
ClosedChannelException(const ClosedChannelException& src);
ClosedChannelException& operator=(const ClosedChannelException&);
};
/** Signals that an error occurred while attempting to bind a socket to
a local address and port. Typically, the port is in use, or the
requested local address could not be assigned.
*/
class LOG4CXX_EXPORT BindException : public SocketException
{
public:
BindException(log4cxx_status_t status);
BindException(const BindException&);
BindException& operator=(const BindException&);
};
/** Signals that an I/O operation has been interrupted. An
InterruptedIOException is thrown to indicate that an input or output
transfer has been terminated because the thread performing it was
interrupted. The field bytesTransferred indicates how many bytes were
successfully transferred before the interruption occurred.
*/
class LOG4CXX_EXPORT InterruptedIOException : public IOException
{
public:
InterruptedIOException(const LogString& msg);
InterruptedIOException(const InterruptedIOException&);
InterruptedIOException& operator=(const InterruptedIOException&);
};
/** Signals that an I/O operation has been interrupted. An
InterruptedIOException is thrown to indicate that an input or output
transfer has been terminated because the thread performing it was
interrupted. The field bytesTransferred indicates how many bytes were
successfully transferred before the interruption occurred.
*/
class LOG4CXX_EXPORT SocketTimeoutException : public InterruptedIOException
{
public:
SocketTimeoutException();
SocketTimeoutException(const SocketTimeoutException&);
SocketTimeoutException& operator=(const SocketTimeoutException&);
};
} // namespace helpers
} // namespace log4cxx
#endif // _LOG4CXX_HELPERS_EXCEPTION_H
|