diff --git a/contrib/epee/include/serialization/keyvalue_helpers.h b/contrib/epee/include/serialization/keyvalue_helpers.h index 9d0f1d74..0cf99221 100644 --- a/contrib/epee/include/serialization/keyvalue_helpers.h +++ b/contrib/epee/include/serialization/keyvalue_helpers.h @@ -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