little fix in command line parser - catch unknown parameter types

This commit is contained in:
Vadim Pisarevsky 2012-09-07 17:49:38 +04:00
parent 0598f33a85
commit 7c13dc6cb3

View File

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