Catch exceptions and write out their message

This commit is contained in:
Magnus Norddahl 2016-11-29 13:53:02 +01:00
parent f4d5fb4c25
commit 046f5f2b2e

View file

@ -633,6 +633,8 @@ void AddSourceFileTimestamp(const char *timestamp)
int main(int argc, char **argv)
{
try
{
if (argc != 2)
{
std::cerr << "Usage: " << argv[0] << "<output filename>" << std::endl;
@ -707,4 +709,10 @@ int main(int argc, char **argv)
//LLVMDrawers drawersAVX2("haswell");
return 0;
}
catch (const std::exception &e)
{
std::cerr << e.what() << std::endl;
return 1;
}
}