| 15 | }; |
| 16 | |
| 17 | SerializationError::SerializationError(std::string field, Error&& err) noexcept { |
| 18 | if (err.isA<SerializationError>()) { |
| 19 | auto& serr = err.as<SerializationError>(); |
| 20 | mField = std::move(field); |
| 21 | mField += std::move(serr.mField); |
| 22 | mErr = std::move(serr.mErr); |
| 23 | } else { |
| 24 | if (field.ends_with('.')) { |
| 25 | field.pop_back(); |
| 26 | } |
| 27 | mField = std::move(field); |
| 28 | mErr = std::move(err); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | std::string SerializationError::message(std::string_view locale) const noexcept { |
| 33 | return "Reflection error in field '{}':\n{}"_trl(locale, mField, mErr.message(locale)); |
nothing calls this directly
no outgoing calls
no test coverage detected