mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Enabled -fno-exceptions
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user