Open jobarr-amzn opened 1 year ago
I just ran into this again, when ion beta symtab filter
from ion-cli aborted with an error message Error: found a non-value in value position
.
I can track that error message to header resolution in one of these places:
This doesn't leave me with enough information, though, to narrow down where in 14MB of binary data the problem is.
When reviewing a change to ElementStreamWriter I saw this chunk of code: https://github.com/amazon-ion/ion-rust/blob/2fa18ed94e8716fd582cc89683989b64a667cd88/src/element/element_stream_writer.rs#L110-L117
This makes me think about what I would like to see (as a user of this library) if I somehow triggered this case. Right now the error message tells me "some struct value did not have a field name", but which one? How did I get here? A stack trace if presented may be helpful, but some notion of which data is being written or read could be more helpful.
What kind of information would be useful here? We can't "just" dump the local struct-in-progress to the error message, that's likely to be unwieldy or even untenable, and might not even be helpful. I'd suggest that some kind of path expression tracking current context in stream would be useful.