Skip to content

Commit

Permalink
Merge branch 'main' into f/conan_package
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzicheng1987 committed Nov 27, 2024
2 parents a78d7f4 + cb06a08 commit 499c7b1
Show file tree
Hide file tree
Showing 4 changed files with 9,820 additions and 9,627 deletions.
12 changes: 8 additions & 4 deletions include/rfl/parsing/TupleReader.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef RFL_PARSING_TUPLEREADER_HPP_
#define RFL_PARSING_TUPLEREADER_HPP_

#include <sstream>
#include <string_view>
#include <tuple>
#include <type_traits>
Expand Down Expand Up @@ -76,15 +77,18 @@ class TupleReader {
move_to(&(rfl::get<_i>(*tuple_)), &(*res));
++num_set_;
} else {
*_err = Error("Failed to parse field " + std::to_string(_i) + ": " +
res.error()->what());
std::stringstream stream;
stream << "Failed to parse field " << _i << ": "
<< res.error()->what();
*_err = Error(stream.str());
}
return;
}
read_impl<_i + 1>(_var, _err);
} else {
*_err = Error("Expected " + std::to_string(size_) +
" fields, but got at least one more.");
std::stringstream stream;
stream << "Expected " << size_ << " fields, but got at least one more.";
*_err = Error(stream.str());
return;
}
}
Expand Down
Loading

0 comments on commit 499c7b1

Please sign in to comment.