Skip to content

Commit

Permalink
Add error message for incorrect member lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent 188890c commit 94b9bfd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions impeller/archivist/archive_class_registration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "impeller/archivist/archive_database.h"
#include "impeller/archivist/archive_statement.h"
#include "impeller/base/validation.h"

namespace impeller {

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

0 comments on commit 94b9bfd

Please sign in to comment.