Enabled -fno-exceptions

This commit is contained in:
Ravin Perera
2019-10-17 11:16:37 +05:30
parent da9c5de9d0
commit 7c068ecb85
3 changed files with 21 additions and 9 deletions

View File

@@ -2,6 +2,9 @@
Entry point for HP Core
**/
// This will direct all boost exceptions to our error handler.
#define BOOST_NO_EXCEPTIONS
#include <cstdio>
#include <iostream>
#include <thread>
@@ -147,3 +150,12 @@ int main(int argc, char **argv)
std::cout << "exited normally\n";
return 0;
}
/**
* Global exception handler for boost exceptions.
*/
void boost::throw_exception(std::exception const &e)
{
std::cerr << "Boost error:" << e.what() << std::endl;
exit(-1);
}