diff --git a/form/form/form_source_type_registry.cpp b/form/form/form_source_type_registry.cpp index cb99e6e70..a9a62f1bb 100644 --- a/form/form/form_source_type_registry.cpp +++ b/form/form/form_source_type_registry.cpp @@ -31,8 +31,8 @@ namespace form::experimental { form_source_product_from_data_fn product_from_data_fn) { if (!product_from_data_fn) { - form::detail::experimental::error( - "Cannot register FORM product type with empty conversion function"); + throw std::runtime_error( + "form: Cannot register FORM product type with empty conversion function"); } std::scoped_lock const lock(form_type_registry_mutex()); diff --git a/form/form/form_source_type_registry.hpp b/form/form/form_source_type_registry.hpp index 5f96a8dab..e38eab0d2 100644 --- a/form/form/form_source_type_registry.hpp +++ b/form/form/form_source_type_registry.hpp @@ -4,7 +4,6 @@ #define FORM_FORM_FORM_SOURCE_TYPE_REGISTRY_HPP #include "phlex/model/products.hpp" -#include "util/error.hpp" #include #include @@ -40,8 +39,8 @@ namespace form::experimental { std::string const& product_name, std::string const& index_str) -> phlex::experimental::product_ptr { if (!data) { - form::detail::experimental::error("Failed to retrieve product [" + product_name + "] for " + - index_str); + throw std::runtime_error("form: Failed to retrieve product [" + product_name + "] for " + + index_str); } auto ptr = std::unique_ptr(static_cast(data));