MCPcopy Create free account
hub / github.com/LiteLDev/LeviLamina / SerializationError

Method SerializationError

src/ll/api/reflection/ReflectionError.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15};
16
17SerializationError::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
32std::string SerializationError::message(std::string_view locale) const noexcept {
33 return "Reflection error in field '{}':\n{}"_trl(locale, mField, mErr.message(locale));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected