Skip to content
Merged
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
3 changes: 1 addition & 2 deletions include/rfl/parsing/ViewReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ class ViewReader {
if (!already_assigned) {
std::stringstream stream;
stream << "Value named '" << _current_name_or_index
<< "' not used. Remove the rfl::NoExtraFields processor or add "
"rfl::ExtraFields to avoid this error message.";
<< "' not used.";
Comment on lines 144 to +145
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change simplifies the error message, but it also removes helpful context for the developer. While I understand the goal of not exposing library-specific names, the new message might leave developers wondering why an unused field is an error. A good compromise could be to add a hint explaining the reason, which would improve the developer experience without being too specific.

Suggested change
stream << "Value named '" << _current_name_or_index
<< "' not used. Remove the rfl::NoExtraFields processor or add "
"rfl::ExtraFields to avoid this error message.";
<< "' not used.";
stream << "Value named '" << _current_name_or_index
<< "' not used (extra fields are not allowed).";

_errors->emplace_back(Error(stream.str()));
}
}
Expand Down
Loading