ion-c
ion-c copied to clipboard
ion_reader_read_* gives misleading error message when given reader is bad
If you call one of the ion_reader
methods (for example ion_reader_read_timestamp
) with a bad hREADER
pointer, the methods fail with IERR_INVALID_STATE
, which is misleading. There should be a specific error to indicate that an invalid reader was provided. The current code implies that the method is being called at a bad point in the reader's state-transition model, which isn't the case.