1
0
mirror of https://github.com/paboyle/Grid.git synced 2026-01-08 02:49:33 +00:00

Hadrons: custom abort with module trace

This commit is contained in:
2018-04-23 12:48:00 +01:00
parent 1c9722357d
commit b0b5b34bff
3 changed files with 29 additions and 16 deletions

View File

@@ -69,22 +69,7 @@ int main(int argc, char *argv[])
}
catch (const std::exception& e)
{
auto &vm = VirtualMachine::getInstance();
int mod = vm.getCurrentModule();
LOG(Error) << "FATAL ERROR -- Exception " << typeName(&typeid(e))
<< std::endl;
if (mod >= 0)
{
LOG(Error) << "During execution of module '"
<< vm.getModuleName(mod) << "' (address " << mod << ")"
<< std::endl;
}
LOG(Error) << e.what() << std::endl;
LOG(Error) << "Aborting program" << std::endl;
Grid_finalize();
return EXIT_FAILURE;
Exceptions::abort(e);
}
// epilogue