} else {
if (unlink(commandPath.CStr()) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("unlink")
- << errinfo_errno(errno)
- << errinfo_file_name(commandPath));
+ << boost::errinfo_api_function("unlink")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(commandPath));
}
}
}
if (!fifo_ok && mkfifo(commandPath.CStr(), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("mkfifo")
- << errinfo_errno(errno)
- << errinfo_file_name(commandPath));
+ << boost::errinfo_api_function("mkfifo")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(commandPath));
}
for (;;) {
if (fd < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("open")
- << errinfo_errno(errno)
- << errinfo_file_name(commandPath));
+ << boost::errinfo_api_function("open")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(commandPath));
}
FILE *fp = fdopen(fd, "r");
if (fp == NULL) {
(void) close(fd);
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("fdopen")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("fdopen")
+ << boost::errinfo_errno(errno));
}
char line[2048];
statusfp.close();
if (rename(statuspathtmp.CStr(), statuspath.CStr()) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("rename")
- << errinfo_errno(errno)
- << errinfo_file_name(statuspathtmp));
+ << boost::errinfo_api_function("rename")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(statuspathtmp));
}
objectfp.close();
if (rename(objectspathtmp.CStr(), objectspath.CStr()) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("rename")
- << errinfo_errno(errno)
- << errinfo_file_name(objectspathtmp));
+ << boost::errinfo_api_function("rename")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(objectspathtmp));
}
}
#include <boost/foreach.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <boost/algorithm/string/split.hpp>
+#include <boost/exception/errinfo_api_function.hpp>
+#include <boost/exception/errinfo_errno.hpp>
+#include <boost/exception/errinfo_file_name.hpp>
#include <iostream>
using namespace icinga;
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
BOOST_THROW_EXCEPTION(win32_error()
- << errinfo_api_function("WSAStartup")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("WSAStartup")
+ << boost::errinfo_win32_error(WSAGetLastError()));
}
#endif /* _WIN32 */
char buffer[MAXPATHLEN];
if (getcwd(buffer, sizeof(buffer)) == NULL) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("getcwd")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("getcwd")
+ << boost::errinfo_errno(errno));
}
String workingDirectory = buffer;
if (realpath(executablePath.CStr(), buffer) == NULL) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("realpath")
- << errinfo_errno(errno)
- << errinfo_file_name(executablePath));
+ << boost::errinfo_api_function("realpath")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(executablePath));
}
return buffer;
if (!GetModuleFileName(NULL, FullExePath, sizeof(FullExePath)))
BOOST_THROW_EXCEPTION(win32_error()
- << errinfo_api_function("GetModuleFileName")
- << errinfo_win32_error(GetLastError()));
+ << boost::errinfo_api_function("GetModuleFileName")
+ << boost::errinfo_win32_error(GetLastError()));
return FullExePath;
#endif /* _WIN32 */
#include <fstream>
#include <boost/make_shared.hpp>
#include <boost/foreach.hpp>
+#include <boost/exception/errinfo_api_function.hpp>
+#include <boost/exception/errinfo_errno.hpp>
+#include <boost/exception/errinfo_file_name.hpp>
using namespace icinga;
if (rename(tempFilename.CStr(), filename.CStr()) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("rename")
- << errinfo_errno(errno)
- << errinfo_file_name(tempFilename));
+ << boost::errinfo_api_function("rename")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(tempFilename));
}
}
#include "base/stacktrace.h"
#include <sstream>
#include <boost/thread/tss.hpp>
+#include <boost/exception/errinfo_api_function.hpp>
+#include <boost/exception/errinfo_errno.hpp>
+#include <boost/exception/errinfo_file_name.hpp>
#ifdef _WIN32
# include <boost/algorithm/string/trim.hpp>
#ifdef _WIN32
class I2_BASE_API win32_error : virtual public std::exception, virtual public boost::exception { };
+struct errinfo_win32_error_;
typedef boost::error_info<struct errinfo_win32_error_, int> errinfo_win32_error;
inline std::string to_string(const errinfo_win32_error& e)
class I2_BASE_API openssl_error : virtual public std::exception, virtual public boost::exception { };
+struct errinfo_openssl_error_;
typedef boost::error_info<struct errinfo_openssl_error_, int> errinfo_openssl_error;
inline std::string to_string(const errinfo_openssl_error& e)
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/weak_ptr.hpp>
-#include <boost/exception/error_info.hpp>
-#include <boost/exception/errinfo_api_function.hpp>
-#include <boost/exception/errinfo_errno.hpp>
-#include <boost/exception/errinfo_file_name.hpp>
using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::static_pointer_cast;
-using boost::errinfo_api_function;
-using boost::errinfo_errno;
-using boost::errinfo_file_name;
#if defined(__APPLE__) && defined(__MACH__)
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if HAVE_PIPE2
if (pipe2(fds, O_CLOEXEC) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("pipe2")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("pipe2")
+ << boost::errinfo_errno(errno));
}
#else /* HAVE_PIPE2 */
if (pipe(fds) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("pipe")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("pipe")
+ << boost::errinfo_errno(errno));
}
/* Don't bother setting fds[0] to clo-exec as we'll only
if (childTaskFd < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("dup")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("dup")
+ << boost::errinfo_errno(errno));
}
Utility::SetNonBlocking(childTaskFd);
if (pfds == NULL) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("realloc")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("realloc")
+ << boost::errinfo_errno(errno));
}
int idx = 0;
if (rc < 0 && errno != EINTR) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("poll")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("poll")
+ << boost::errinfo_errno(errno));
}
if (rc == 0)
break; /* Someone else was faster and took our task. */
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("read")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("read")
+ << boost::errinfo_errno(errno));
}
while (have > 0) {
*/
if (write(m_TaskFd, "T", 1) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("write")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("write")
+ << boost::errinfo_errno(errno));
}
}
}
#if HAVE_PIPE2
if (pipe2(fds, O_NONBLOCK | O_CLOEXEC) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("pipe2")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("pipe2")
+ << boost::errinfo_errno(errno));
}
#else /* HAVE_PIPE2 */
if (pipe(fds) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("pipe")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("pipe")
+ << boost::errinfo_errno(errno));
}
Utility::SetNonBlocking(fds[0]);
if (m_Pid < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("fork")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("fork")
+ << boost::errinfo_errno(errno));
}
if (m_Pid == 0) {
if (waitpid(m_Pid, &status, 0) != m_Pid) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("waitpid")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("waitpid")
+ << boost::errinfo_errno(errno));
}
if (WIFEXITED(status)) {
#define STRING_H
#include "base/i2-base.h"
+#include <boost/range/iterator.hpp>
#include <ostream>
#include <istream>
#include <sstream>
#include <boost/bind.hpp>
#include <boost/make_shared.hpp>
+#include <boost/exception/errinfo_api_function.hpp>
+#include <boost/exception/errinfo_errno.hpp>
+#include <boost/exception/errinfo_file_name.hpp>
using namespace icinga;
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("select")
- << errinfo_errno(GetError()));
+ << boost::errinfo_api_function("select")
+ << boost::errinfo_errno(GetError()));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("select")
- << errinfo_win32_error(GetError()));
+ << boost::errinfo_api_function("select")
+ << boost::errinfo_win32_error(GetError()));
#endif /* _WIN32 */
}
sizeof(service), NI_NUMERICHOST | NI_NUMERICSERV) < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getnameinfo")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("getnameinfo")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getnameinfo")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("getnameinfo")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (getsockname(GetFD(), (sockaddr *)&sin, &len) < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getsockname")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("getsockname")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getsockname")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("getsockname")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (getpeername(GetFD(), (sockaddr *)&sin, &len) < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getpeername")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("getpeername")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getpeername")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("getpeername")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (rc < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("select")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("select")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("select")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("select")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (rc < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("select")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("select")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("select")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("select")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (listen(GetFD(), SOMAXCONN) < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("listen")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("listen")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("listen")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("listen")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (rc <= 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("send")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("send")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("send")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("send")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (rc < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("recv")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("recv")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("recv")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("recv")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (fd < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("accept")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("accept")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("accept")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("accept")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
******************************************************************************/
#include "base/tcpsocket.h"
+#include <boost/exception/errinfo_api_function.hpp>
+#include <boost/exception/errinfo_errno.hpp>
+#include <boost/exception/errinfo_file_name.hpp>
using namespace icinga;
service.CStr(), &hints, &result) < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getaddrinfo")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("getaddrinfo")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getaddrinfo")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("getaddrinfo")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (rc < 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getaddrinfo")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("getaddrinfo")
+ << boost::errinfo_errno(errno));
#else /* _WIN32 */
BOOST_THROW_EXCEPTION(socket_error()
- << errinfo_api_function("getaddrinfo")
- << errinfo_win32_error(WSAGetLastError()));
+ << boost::errinfo_api_function("getaddrinfo")
+ << boost::errinfo_win32_error(WSAGetLastError()));
#endif /* _WIN32 */
}
if (!m_SSL) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_new")
+ << boost::errinfo_api_function("SSL_new")
<< errinfo_openssl_error(ERR_get_error()));
}
default:
I2Stream_check_exception(m_BIO);
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_do_handshake")
+ << boost::errinfo_api_function("SSL_do_handshake")
<< errinfo_openssl_error(ERR_get_error()));
}
}
default:
I2Stream_check_exception(m_BIO);
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_read")
+ << boost::errinfo_api_function("SSL_read")
<< errinfo_openssl_error(ERR_get_error()));
}
}
default:
I2Stream_check_exception(m_BIO);
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_write")
+ << boost::errinfo_api_function("SSL_write")
<< errinfo_openssl_error(ERR_get_error()));
}
}
if (fd < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("socket")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("socket")
+ << boost::errinfo_errno(errno));
}
SetFD(fd);
if (bind(GetFD(), (sockaddr *)&sun, SUN_LEN(&sun)) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("bind")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("bind")
+ << boost::errinfo_errno(errno));
}
}
if (connect(GetFD(), (sockaddr *)&sun, SUN_LEN(&sun)) < 0 && errno != EINPROGRESS) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("connect")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("connect")
+ << boost::errinfo_errno(errno));
}
}
#endif /* _WIN32 */
if (!SSL_CTX_use_certificate_chain_file(sslContext.get(), pubkey.CStr())) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_CTX_use_certificate_chain_file")
+ << boost::errinfo_api_function("SSL_CTX_use_certificate_chain_file")
<< errinfo_openssl_error(ERR_get_error())
- << errinfo_file_name(pubkey));
+ << boost::errinfo_file_name(pubkey));
}
if (!SSL_CTX_use_PrivateKey_file(sslContext.get(), privkey.CStr(), SSL_FILETYPE_PEM)) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_CTX_use_PrivateKey_file")
+ << boost::errinfo_api_function("SSL_CTX_use_PrivateKey_file")
<< errinfo_openssl_error(ERR_get_error())
- << errinfo_file_name(privkey));
+ << boost::errinfo_file_name(privkey));
}
if (!SSL_CTX_load_verify_locations(sslContext.get(), cakey.CStr(), NULL)) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_CTX_load_verify_locations")
+ << boost::errinfo_api_function("SSL_CTX_load_verify_locations")
<< errinfo_openssl_error(ERR_get_error())
- << errinfo_file_name(cakey));
+ << boost::errinfo_file_name(cakey));
}
STACK_OF(X509_NAME) *cert_names;
cert_names = SSL_load_client_CA_file(cakey.CStr());
if (cert_names == NULL) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("SSL_load_client_CA_file")
+ << boost::errinfo_api_function("SSL_load_client_CA_file")
<< errinfo_openssl_error(ERR_get_error())
- << errinfo_file_name(cakey));
+ << boost::errinfo_file_name(cakey));
}
SSL_CTX_set_client_CA_list(sslContext.get(), cert_names);
if (rc == -1) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("X509_NAME_get_text_by_NID")
+ << boost::errinfo_api_function("X509_NAME_get_text_by_NID")
<< errinfo_openssl_error(ERR_get_error()));
}
if (fpcert == NULL) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("BIO_new")
+ << boost::errinfo_api_function("BIO_new")
<< errinfo_openssl_error(ERR_get_error()));
}
if (BIO_read_filename(fpcert, pemfile.CStr()) < 0) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("BIO_read_filename")
+ << boost::errinfo_api_function("BIO_read_filename")
<< errinfo_openssl_error(ERR_get_error())
- << errinfo_file_name(pemfile));
+ << boost::errinfo_file_name(pemfile));
}
cert = PEM_read_bio_X509_AUX(fpcert, NULL, NULL, NULL);
if (cert == NULL) {
BOOST_THROW_EXCEPTION(openssl_error()
- << errinfo_api_function("PEM_read_bio_X509_AUX")
+ << boost::errinfo_api_function("PEM_read_bio_X509_AUX")
<< errinfo_openssl_error(ERR_get_error()));
}
free(dir);
BOOST_THROW_EXCEPTION(win32_error()
- << errinfo_api_function("PathRemoveFileSpec")
- << errinfo_win32_error(GetLastError()));
+ << boost::errinfo_api_function("PathRemoveFileSpec")
+ << errinfo_win32_error(GetLastError()));
}
result = dir;
if (gettimeofday(&tv, NULL) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("gettimeofday")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("gettimeofday")
+ << boost::errinfo_errno(errno));
}
return tv.tv_sec + tv.tv_usec / 1000000.0;
if (hModule == NULL) {
BOOST_THROW_EXCEPTION(win32_error()
- << errinfo_api_function("LoadLibrary")
- << errinfo_win32_error(GetLastError())
- << errinfo_file_name(path));
+ << boost::errinfo_api_function("LoadLibrary")
+ << errinfo_win32_error(GetLastError())
+ << boost::errinfo_file_name(path));
}
#else /* _WIN32 */
lt_dlhandle hModule = lt_dlopen(path.CStr());
return false;
BOOST_THROW_EXCEPTION(win32_error()
- << errinfo_api_function("FindFirstFile")
- << errinfo_win32_error(errorCode)
- << errinfo_file_name(pathSpec));
+ << boost::errinfo_api_function("FindFirstFile")
+ << boost::errinfo_win32_error(errorCode)
+ << boost::errinfo_file_name(pathSpec));
}
do {
if (!FindClose(handle)) {
BOOST_THROW_EXCEPTION(win32_error()
- << errinfo_api_function("FindClose")
+ << boost::errinfo_api_function("FindClose")
<< errinfo_win32_error(GetLastError()));
}
return false;
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("glob")
- << errinfo_errno(errno)
- << errinfo_file_name(pathSpec));
+ << boost::errinfo_api_function("glob")
+ << boost::errinfo_errno(errno)
+ << boost::errinfo_file_name(pathSpec));
}
if (gr.gl_pathc == 0) {
if (flags < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("fcntl")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("fcntl")
+ << boost::errinfo_errno(errno));
}
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("fcntl")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("fcntl")
+ << boost::errinfo_errno(errno));
}
}
if (flags < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("fcntl")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("fcntl")
+ << boost::errinfo_errno(errno));
}
if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("fcntl")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("fcntl")
+ << boost::errinfo_errno(errno));
}
}
#endif /* _WIN32 */
if (temp == NULL) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("localtime")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("localtime")
+ << boost::errinfo_errno(errno));
}
tmthen = *temp;
#else /* _MSC_VER */
if (localtime_r(&tempts, &tmthen) == NULL) {
BOOST_THROW_EXCEPTION(posix_error()
- << errinfo_api_function("localtime_r")
- << errinfo_errno(errno));
+ << boost::errinfo_api_function("localtime_r")
+ << boost::errinfo_errno(errno));
}
#endif /* _MSC_VER */