Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions form/form/form_source_type_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
5 changes: 2 additions & 3 deletions form/form/form_source_type_registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#define FORM_FORM_FORM_SOURCE_TYPE_REGISTRY_HPP

#include "phlex/model/products.hpp"
#include "util/error.hpp"

#include <functional>
#include <stdexcept>
Expand Down Expand Up @@ -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<product_type_t const>(static_cast<product_type_t const*>(data));
Expand Down
Loading