From 07b402402426b286415ca0410c63a1733a6c7448 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 29 Dec 2007 02:03:13 +0000 Subject: [PATCH] made debug.hpp build without exception support --- include/libtorrent/debug.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/libtorrent/debug.hpp b/include/libtorrent/debug.hpp index 96c2c9dc7..0f2dad20b 100755 --- a/include/libtorrent/debug.hpp +++ b/include/libtorrent/debug.hpp @@ -60,17 +60,21 @@ namespace libtorrent { logger(fs::path const& logpath, fs::path const& filename, int instance, bool append = true) { +#ifndef BOOST_NO_EXCEPTIONS try { +#endif fs::path dir(fs::complete(logpath / ("libtorrent_logs" + boost::lexical_cast(instance)))); if (!fs::exists(dir)) fs::create_directories(dir); m_file.open((dir / filename).string().c_str(), std::ios_base::out | (append ? std::ios_base::app : std::ios_base::out)); *this << "\n\n\n*** starting log ***\n"; +#ifndef BOOST_NO_EXCEPTIONS } catch (std::exception& e) { std::cerr << "failed to create log '" << filename.string() << "': " << e.what() << std::endl; } +#endif } template