Skip to content

Commit 94b9bfd

Browse files
chinmaygardednfield
authored andcommitted
Add error message for incorrect member lookup.
1 parent 188890c commit 94b9bfd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

impeller/archivist/archive_class_registration.cc

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "impeller/archivist/archive_database.h"
1010
#include "impeller/archivist/archive_statement.h"
11+
#include "impeller/base/validation.h"
1112

1213
namespace impeller {
1314

@@ -39,6 +40,9 @@ std::optional<size_t> ArchiveClassRegistration::FindColumnIndex(
3940
const std::string& member) const {
4041
auto found = column_map_.find(member);
4142
if (found == column_map_.end()) {
43+
VALIDATION_LOG << "No member named '" << member << "' in class '"
44+
<< definition_.table_name
45+
<< "'. Did you forget to register it?";
4246
return std::nullopt;
4347
}
4448
return found->second;

0 commit comments

Comments
 (0)