little fix in command line parser - catch unknown parameter types
authorVadim Pisarevsky <vadim.pisarevsky@itseez.com>
Fri, 7 Sep 2012 13:49:38 +0000 (17:49 +0400)
committerVadim Pisarevsky <vadim.pisarevsky@itseez.com>
Fri, 7 Sep 2012 13:49:38 +0000 (17:49 +0400)
modules/core/src/command_line_parser.cpp

index 8cfeaf3..3dbb1ac 100644 (file)
@@ -71,6 +71,8 @@ static void from_str(const string& str, int type, void* dst)
         ss >> *(double*)dst;\r
     else if( type == Param::STRING )\r
         ss >> *(string*)dst;\r
+    else\r
+        CV_Error(CV_StsBadArg, "unknown/unsupported parameter type");\r
     \r
     if (ss.fail())\r
     {\r