From b4c32be85c27f94dd38fd403514c32a8737a5a4e Mon Sep 17 00:00:00 2001 From: Andrew Olivier Date: Tue, 24 Nov 2026 10:29:07 -0600 Subject: [PATCH 1/3] Moved form::experimental::error out of public headers. form_source_type_registry.hpp just throws a std::runtime_error like normal. --- form/form/form_source_type_registry.cpp | 2 ++ form/form/form_source_type_registry.hpp | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/form/form/form_source_type_registry.cpp b/form/form/form_source_type_registry.cpp index cb99e6e70..7d37ae1a8 100644 --- a/form/form/form_source_type_registry.cpp +++ b/form/form/form_source_type_registry.cpp @@ -2,6 +2,8 @@ #include "form_source_type_registry.hpp" +#include "util/error.hpp" + #include #include #include 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)); From b95572b06e209477799c14bb125defaa32faf08e Mon Sep 17 00:00:00 2001 From: Andrew Olivier Date: Tue, 24 Nov 2026 10:40:26 -0600 Subject: [PATCH 2/3] Removed form::experimental::error from form_source_type_registry.cpp too for consistency with the header. --- form/form/form_source_type_registry.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/form/form/form_source_type_registry.cpp b/form/form/form_source_type_registry.cpp index 7d37ae1a8..b156c79ca 100644 --- a/form/form/form_source_type_registry.cpp +++ b/form/form/form_source_type_registry.cpp @@ -2,8 +2,6 @@ #include "form_source_type_registry.hpp" -#include "util/error.hpp" - #include #include #include @@ -33,8 +31,7 @@ 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()); From 68e9f5729f0c84c2ab3756090bd83767f9a10b2d Mon Sep 17 00:00:00 2001 From: Andrew Olivier Date: Tue, 24 Nov 2026 14:42:53 -0600 Subject: [PATCH 3/3] clang-format --- form/form/form_source_type_registry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/form/form/form_source_type_registry.cpp b/form/form/form_source_type_registry.cpp index b156c79ca..a9a62f1bb 100644 --- a/form/form/form_source_type_registry.cpp +++ b/form/form/form_source_type_registry.cpp @@ -31,7 +31,8 @@ namespace form::experimental { form_source_product_from_data_fn product_from_data_fn) { if (!product_from_data_fn) { - throw std::runtime_error("form: 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());