mFAST
mFAST copied to clipboard
value of mandatory string field isn't saved
Data feed starts with "Hello" message, then multiple "Data" messages follow. All messages have the same header. Template looks as follows:
...
<template name="T_HEAD" dictionary="template">
<string name="Field"><copy/></string>
...
</template>
<template name="Hello" dictionary="template" id="54321">
<string name="MsgType"><constant value="Ehlo"/></string>
<group name="Head" presence="optional">
<templateRef name="T_HEAD"/>
</group>
...
</template>
<template name="Data" dictionary="template" id="54322">
<string name="MsgType"><constant value="Data"/></string>
<group name="Head" presence="optional">
<templateRef name="T_HEAD"/>
</group>
...
</template>
...
On decode side initial "Hello" is processed with no problems, but decode of first "Data" fails:
/home/v/src/mfast-HEAD/src/mfast/coder/decoder/decoder_field_operator.cpp(232): Throw in function void mfast::decoder_detail::copy_or_increment_operator_impl<Operation>::decode_impl(const T&, mfast::fast_istream&, mfast::decoder_presence_map&) const [with T = mfast::string_mref
; Operation = mfast::decoder_detail::null_operation] Dynamic exception type: boost::exception_detail::clone_implmfast::fast_dynamic_error std::exception::what: std::exception [mfast::tag_error_code*] = D5
UPD: please ignore last comment (stroke though).