use separate exceptions
This commit is contained in:
parent
cab273ccc0
commit
3b337fd980
1 changed files with 3 additions and 1 deletions
|
@ -202,9 +202,11 @@ public:
|
|||
case PARAMETER_BYTES:
|
||||
return ParameterVariant(parameter.name, parameter.value.bytes_value);
|
||||
case PARAMETER_NOT_SET:
|
||||
throw std::runtime_error("Type from ParameterValue is not set");
|
||||
default:
|
||||
// TODO: use custom exception
|
||||
throw std::runtime_error("Invalid type from ParameterValue");
|
||||
throw std::runtime_error(
|
||||
"Unexpected type from ParameterVariant: " + std::to_string(parameter.value.type));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue