diff --git a/src/strings_internal.h b/src/strings_internal.h index 4d6b1a5b7e..407d73d996 100644 --- a/src/strings_internal.h +++ b/src/strings_internal.h @@ -94,7 +94,7 @@ public: const auto ¶m = GetNextParameterReference(); const uint64_t *data = std::get_if(¶m.data); if (data != nullptr) return static_cast(*data); - throw std::runtime_error("Attempt to read string parameter as integer"); + throw std::out_of_range("Attempt to read string parameter as integer"); } /** @@ -108,7 +108,7 @@ public: const auto ¶m = GetNextParameterReference(); const std::string *data = std::get_if(¶m.data); if (data != nullptr) return data->c_str(); - throw std::runtime_error("Attempt to read integer parameter as string"); + throw std::out_of_range("Attempt to read integer parameter as string"); } /**