This commit is contained in:
sha512sum 2024-10-19 18:50:47 +00:00
parent da9640ca96
commit 4177dc88d0

View file

@ -134,7 +134,8 @@ auto ParseField(xmlpp::Element* main) -> std::decay_t<decltype(Config)>::type {
if constexpr(std::holds_alternative<AttributeConfig>(Config.Base())) {
xmlpp::Attribute* node = main->get_attribute(Info::kName);
if(!node) {
throw AttributeSerializationError(std::format("Attribute [{}] serialization error", Info::kName));
throw AttributeSerializationError(
std::format("Attribute [{}: {}] serialization error", Info::kName, nameof::nameof_full_type<Type>()));
}
if constexpr(requires(std::string_view view) { Type::Parse(view); }) {
return Type::Parse(node->get_value());