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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user