yaccety_sax icon indicating copy to clipboard operation
yaccety_sax copied to clipboard

Handle Incomplete Documents in Stream

Open t8rsalad opened this issue 2 years ago • 1 comments

Hi! This is the other side of a similar issue (#8). We sometimes see incomplete documents in a packet, when a large document was split across multiple packets.

It would be helpful to have an error that to throw, specifying that the XML was incomplete, but not necessarily invalid. It seems like this could be an option to ys_state (throw_incomplete :: boolean()) or something, that when true, throws when a document is incomplete, and when false, or causes a fatal error.

t8rsalad avatar Jul 25 '22 14:07 t8rsalad

I'm going to put some thought into this...

It was kind of what the continuation function was for, but I see now that that forces the caller to not be in complete control of the entire parsing path..

Need to see if a good nights sleep helps me come up with something. 😃

zadean avatar Jul 26 '22 19:07 zadean