Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions src/ToolChain/ToolChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ int ToolChain::Initialise(){
#ifndef DEBUG
}
catch(std::exception& e){
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!! "<<m_toolnames.at(i)<<" Failed to initialise (uncaught exception)\n"<<std::endl;
*m_log<<MsgL(0,m_verbose)<<red<<e.what()<<"\n"<<std::endl;
throw;
result=2;
if(m_errorlevel>0) exit(1);
}
catch(...){
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!! "<<m_toolnames.at(i)<<" Failed to initialise (uncaught error)\n"<<std::endl;
Expand Down Expand Up @@ -220,8 +222,17 @@ int ToolChain::Execute(int repeates){
}

catch(std::exception& e){
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!! "<<m_toolnames.at(i)<<" Failed to execute (uncaught exception)\n"<<std::endl;
*m_log<<MsgL(0,m_verbose)<<red<<e.what()<<"\n"<<std::endl;
throw;
result=2;
if(m_errorlevel>0){
if(m_recover){
m_errorlevel=0;
Finalise();
}
exit(1);
}

}
catch(...){
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!! "<<m_toolnames.at(i)<<" Failed to execute (uncaught error)\n"<<std::endl;
Expand Down Expand Up @@ -274,7 +285,7 @@ int ToolChain::Finalise(){
if(m_tools.at(i)->Finalise()) *m_log<<MsgL(2,m_verbose)<<green<<m_toolnames.at(i)<<" Finalised successfully\n"<<std::endl;

else{
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!!! "<<m_toolnames.at(i)<<" Finalised successfully (error code)\n"<<std::endl;
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!!! "<<m_toolnames.at(i)<<" Error Finalising (error code)\n"<<std::endl;
result=1;
if(m_errorlevel>1)exit(1);
}
Expand All @@ -283,11 +294,15 @@ int ToolChain::Finalise(){
}

catch(std::exception& e){
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!!! "<<m_toolnames.at(i)<<" Error Finalising (uncaught exception)\n"<<std::endl;
*m_log<<MsgL(0,m_verbose)<<red<<e.what()<<"\n"<<std::endl;
throw;

result=2;
if(m_errorlevel>0)exit(1);

}
catch(...){
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!!! "<<m_toolnames.at(i)<<" Finalised successfully (uncaught error)\n"<<std::endl;
*m_log<<MsgL(0,m_verbose)<<red<<"WARNING !!!!!!! "<<m_toolnames.at(i)<<" Error Finalising (uncaught error)\n"<<std::endl;

result=2;
if(m_errorlevel>0)exit(1);
Expand Down