Commit 3dd4fce3 authored by Dominik Charousset's avatar Dominik Charousset

be verbose when dying to exceptions

parent 1e3fb346
...@@ -216,7 +216,22 @@ int client_part(const vector<string_pair>& args) { ...@@ -216,7 +216,22 @@ int client_part(const vector<string_pair>& args) {
} // namespace <anonymous> } // namespace <anonymous>
void verbose_terminate() {
try { throw; }
catch (std::exception& e) {
cerr << "terminate called after throwing "
<< detail::demangle(typeid(e))
<< ", reason: " << e.what() << endl;
}
catch (...) {
cerr << "terminate called after throwing an unknown exception" << endl;
}
abort();
}
int main(int argc, char** argv) { int main(int argc, char** argv) {
set_terminate(verbose_terminate);
announce<actor_vector>(); announce<actor_vector>();
cout.unsetf(ios_base::unitbuf); cout.unsetf(ios_base::unitbuf);
string app_path = argv[0]; string app_path = argv[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment