[enco] Catch std::exception instead of std::runtime_error (#1607)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 20 Sep 2018 23:51:26 +0000 (08:51 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 20 Sep 2018 23:51:26 +0000 (08:51 +0900)
The current implementation catches std::runtime_error, and thus failed
to catch other exceptions such as std::invalid_argument.

This commit revises catch statement to catch std::exception which is a
base class for a wide range of exceptions including
std::invalid_argument.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/cli/src/Driver.cpp

index 6feaeb0..badbb1f 100644 (file)
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
   {
     return entry(argc, argv);
   }
-  catch (const std::runtime_error &e)
+  catch (const std::exception &e)
   {
     std::cerr << "ERROR: " << e.what() << std::endl;
   }