fix: quip: functions involving both callbacks and followups handle errors correctly.
If there's any furhter action to take after the callback, it's necessary to recheck the error slot before taking that action; and of course we definitely don't want to overwrite the error if one had been set during the callback. I wonder if it would ever be useful to have a variant of these functions which *does* attempt to call `Finish`, etc, and thus still build a partial tree at the end even if it stopped on error midway. (Right now, if something stops midway, the final `Build` call will panic, and tell you you haven't finished all the assemblers.) It would be a bit more complicated though: we'd potentially need to accumulate more than one error. And in practice, when working on schema'd data, it would often still result in invalid results (anything other than optional fields, or type-level maps and lists, will fail some other logical rule if not fully filled in), which makes me wonder how often this would be useful.
Showing
Please register or sign in to comment