diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /SwifTools/CrashReporter.cpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to 'SwifTools/CrashReporter.cpp')
-rw-r--r-- | SwifTools/CrashReporter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/SwifTools/CrashReporter.cpp b/SwifTools/CrashReporter.cpp index f47ab33..47015df 100644 --- a/SwifTools/CrashReporter.cpp +++ b/SwifTools/CrashReporter.cpp @@ -1,79 +1,79 @@ /* - * Copyright (c) 2012-2013 Remko Tronçon + * Copyright (c) 2012-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ - +#include <Swiften/Base/Log.h> #include <SwifTools/CrashReporter.h> #include <Swiften/Base/Platform.h> #include <Swiften/Base/Path.h> #if defined(HAVE_BREAKPAD) #pragma GCC diagnostic ignored "-Wold-style-cast" #include <boost/smart_ptr/make_shared.hpp> #ifdef SWIFTEN_PLATFORM_MACOSX #include "client/mac/handler/exception_handler.h" #endif #ifdef SWIFTEN_PLATFORM_WINDOWS #include "client/windows/handler/exception_handler.h" #endif #if defined(SWIFTEN_PLATFORM_WINDOWS) static bool handleDump(const wchar_t* /* dir */, const wchar_t* /* id*/, void* /* context */, EXCEPTION_POINTERS*, MDRawAssertionInfo*, bool /* succeeded */) { return false; } #else static bool handleDump(const char* /* dir */, const char* /* id*/, void* /* context */, bool /* succeeded */) { return false; } #endif namespace Swift { struct CrashReporter::Private { boost::shared_ptr<google_breakpad::ExceptionHandler> handler; }; CrashReporter::CrashReporter(const boost::filesystem::path& path) { // Create the path that will contain the crash dumps if (!boost::filesystem::exists(path)) { try { boost::filesystem::create_directories(path); } catch (const boost::filesystem::filesystem_error& e) { - std::cerr << "ERROR: " << e.what() << std::endl; + SWIFT_LOG(error) << "ERROR: " << e.what() << std::endl; } } p = boost::make_shared<Private>(); #if defined(SWIFTEN_PLATFORM_WINDOWS) // FIXME: Need UTF8 conversion from string to wstring std::string pathString = pathToString(path); p->handler = boost::shared_ptr<google_breakpad::ExceptionHandler>( // Not using make_shared, because 'handleDump' seems to have problems with VC2010 new google_breakpad::ExceptionHandler( std::wstring(pathString.begin(), pathString.end()), (google_breakpad::ExceptionHandler::FilterCallback) 0, handleDump, (void*) 0, google_breakpad::ExceptionHandler::HANDLER_ALL)); // Turning it off for Mac, because it doesn't really help us //#elif defined(SWIFTEN_PLATFORM_MACOSX) // p->handler = boost::make_shared<google_breakpad::ExceptionHandler>(pathToString(path), (google_breakpad::ExceptionHandler::FilterCallback) 0, handleDump, (void*) 0, true, (const char*) 0); #endif } }; #else // Dummy implementation namespace Swift { CrashReporter::CrashReporter(const boost::filesystem::path&) {} } #endif |