Unhandled exceptions lead to error 0xC0000409 on windows

This commit is contained in:
Michael Krasnyk 2016-12-26 22:25:35 +01:00 committed by Moritz Kobitzsch
parent 5db134bbba
commit f8499957fa
3 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,5 @@
#include "contractor/contractor.hpp"
#include "contractor/contractor_config.hpp"
#include "util/exception.hpp"
#include "util/log.hpp"
#include "util/version.hpp"
@ -180,3 +179,8 @@ catch (const std::bad_alloc &e)
util::Log(logERROR) << "Please provide more memory or consider using a larger swapfile";
return EXIT_FAILURE;
}
catch (const std::exception& e)
{
std::cerr << "[exception] " << e.what();
return EXIT_FAILURE;
}

View File

@ -167,3 +167,8 @@ catch (const std::bad_alloc &e)
util::Log(logERROR) << "Please provide more memory or consider using a larger swapfile";
return EXIT_FAILURE;
}
catch (const std::exception& e)
{
std::cerr << "[exception] " << e.what();
return EXIT_FAILURE;
}

View File

@ -19,6 +19,7 @@
#include <signal.h>
#include <chrono>
#include <exception>
#include <future>
#include <iostream>
#include <memory>
@ -372,3 +373,8 @@ catch (const std::bad_alloc &e)
util::Log(logWARNING) << "Please provide more memory or consider using a larger swapfile";
return EXIT_FAILURE;
}
catch (const std::exception& e)
{
std::cerr << "[exception] " << e.what();
return EXIT_FAILURE;
}