forked from lthn/blockchain
added return value check(coverity STREAM_FORMAT_STATE)
This commit is contained in:
parent
2cde1c530d
commit
cf7dc36cf7
1 changed files with 3 additions and 1 deletions
|
|
@ -61,8 +61,10 @@ namespace epee
|
|||
t_pod_type transform_str_to_t_pod(const std::string& a)
|
||||
{
|
||||
t_pod_type res = AUTO_VAL_INIT(res);
|
||||
epee::string_tools::hex_to_pod(a, res);
|
||||
if (!epee::string_tools::hex_to_pod(a, res))
|
||||
throw std::runtime_error(std::string("Unable to transform \"") + a + "\" to pod type " + typeid(t_pod_type).name());
|
||||
return res;
|
||||
CHECK_AND_ASSERT_THROW_MES
|
||||
}
|
||||
|
||||
//basic helpers for blob-to-hex serialization
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue