update block.get_field, block.set_field and fields-related docs

This commit is contained in:
MihailRis
2024-10-02 17:56:19 +03:00
parent e0a4876f3f
commit 87cf6c41bc
6 changed files with 26 additions and 8 deletions
+6
View File
@@ -372,6 +372,12 @@ void StructLayout::deserialize(const dv::value& src) {
int elements = 1;
fieldmap.at("length").get(elements);
if (elements <= 0) {
throw std::runtime_error(
"invalid field " + util::quote(name) + " length: " +
std::to_string(elements)
);
}
auto convertStrategy = FieldConvertStrategy::RESET;
if (fieldmap.has("convert-strategy")) {