Skip to content

Commit

Permalink
improve message when request2mask() would select nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Sep 2, 2023
1 parent 880616a commit a79eab9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pvrequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BitMask request2mask(const FieldDesc* desc, const Value& pvRequest)
}

if(!foundrequested)
throw std::runtime_error("Empty field selection");
throw std::runtime_error("pvRequest must select at least one field");

if(ret.findSet(1)==ret.size()) {
// empty mask is wildcard
Expand Down
2 changes: 1 addition & 1 deletion test/testget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ struct Tester {
.field("invalid")
.exec();

testThrowsMatch<std::runtime_error>("Empty field selection", [&op]() {
testThrowsMatch<std::runtime_error>("pvRequest must select at least one field", [&op]() {
testShow()<<op->wait(4.0);
})<<" pvRequest selects no fields";
}
Expand Down

0 comments on commit a79eab9

Please sign in to comment.