diff --git a/portsyncd/portsyncd.cpp b/portsyncd/portsyncd.cpp index b34a4a0b4204..2b72d29ac769 100644 --- a/portsyncd/portsyncd.cpp +++ b/portsyncd/portsyncd.cpp @@ -163,9 +163,15 @@ int main(int argc, char **argv) } catch (const std::exception& e) { - cerr << "Exception \"" << e.what() << "\" had been thrown in deamon" << endl; + cerr << "Exception \"" << e.what() << "\" was thrown in daemon" << endl; return EXIT_FAILURE; } + catch (...) + { + cerr << "Exception was thrown in daemon" << endl; + return EXIT_FAILURE; + } + return 1; } @@ -224,7 +230,7 @@ void handlePortConfigFile(ProducerStateTable &p, string file, bool warm) if (!infile.is_open()) { usage(); - throw "Port configuration file not found!"; + throw runtime_error("Port configuration file not found!"); } list header = {"name", "lanes", "alias", "speed", "autoneg", "fec"};