Skip to content
Snippets Groups Projects
Commit e3516caf authored by Matthew McGill's avatar Matthew McGill
Browse files

Fixed silent failure issue

Former-commit-id: 32e722e86c572c6fffb1ed7f1a73866ce83660d1
parent 88593ed8
No related branches found
No related tags found
No related merge requests found
...@@ -218,6 +218,7 @@ int main(int argc, char **argv) ...@@ -218,6 +218,7 @@ int main(int argc, char **argv)
cout<<"selective_cfi.exe started\n"; cout<<"selective_cfi.exe started\n";
bool one_success = false; bool one_success = false;
bool seen_failures = false;
for(set<File_t*>::iterator it=pidp->GetFiles().begin(); for(set<File_t*>::iterator it=pidp->GetFiles().begin();
it!=pidp->GetFiles().end(); it!=pidp->GetFiles().end();
++it) ++it)
...@@ -245,15 +246,18 @@ int main(int argc, char **argv) ...@@ -245,15 +246,18 @@ int main(int argc, char **argv)
} }
else else
{ {
seen_failures = true;
cout<<"Skipping (no changes) "<<this_file->GetURL()<<endl; cout<<"Skipping (no changes) "<<this_file->GetURL()<<endl;
} }
} }
catch (DatabaseError_t pnide) catch (DatabaseError_t pnide)
{ {
seen_failures = true;
cerr << programName << ": Unexpected database error: " << pnide << "file url: " << this_file->GetURL() << endl; cerr << programName << ": Unexpected database error: " << pnide << "file url: " << this_file->GetURL() << endl;
} }
catch (...) catch (...)
{ {
seen_failures = true;
cerr << programName << ": Unexpected error file url: " << this_file->GetURL() << endl; cerr << programName << ": Unexpected error file url: " << this_file->GetURL() << endl;
} }
} // end file iterator } // end file iterator
...@@ -265,6 +269,13 @@ int main(int argc, char **argv) ...@@ -265,6 +269,13 @@ int main(int argc, char **argv)
pqxx_interface.Commit(); pqxx_interface.Commit();
} }
return 0; if(seen_failures)
{
return 1;
}
else
{
return 0;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment