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

@ -632,6 +632,8 @@ void AddSourceFileTimestamp(const char *timestamp)
} }
int main(int argc, char **argv) int main(int argc, char **argv)
{
try
{ {
if (argc != 2) if (argc != 2)
{ {
@ -708,3 +710,9 @@ int main(int argc, char **argv)
return 0; return 0;
} }
catch (const std::exception &e)
{
std::cerr << e.what() << std::endl;
return 1;
}
}