Improve docs. Make getFieldT(offset) use vector::at.

This commit is contained in:
Bruno Martins
2019-05-20 15:49:00 -04:00
committed by mdavidsaver
parent a29894ee2b
commit 4dd7a18301
3 changed files with 112 additions and 94 deletions

View File

@@ -169,7 +169,7 @@ static void testStructure()
try {
FieldConstPtr field(struct1->getFieldT(9999));
testFail("missing required exception");
} catch (std::runtime_error& e) {
} catch (std::out_of_range& e) {
testPass("caught expected exception: %s", e.what());
}
@@ -241,7 +241,7 @@ static void testUnion()
try {
FieldConstPtr field(union1->getFieldT(9999));
testFail("missing required exception");
} catch (std::runtime_error& e) {
} catch (std::out_of_range& e) {
testPass("caught expected exception: %s", e.what());
}