int main(int argc, char** argv)
{
- if (argc > 1 && argv[1][0] != '-')
+ try
{
- cloud_host = std::string{"coap+tcp://"} + argv[1] + std::string{":5683"};
+ if (argc > 1 && argv[1][0] != '-')
+ {
+ cloud_host = std::string{"coap+tcp://"} + argv[1] + std::string{":5683"};
+ }
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
}
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
+ catch (std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << std::endl;
+ }
+ catch (...)
+ {
+ std::cout << "Unknown exception" << std::endl;
+ }
+ return -1;
}