ion-c icon indicating copy to clipboard operation
ion-c copied to clipboard

ion_reader_read_* gives misleading error message when given reader is bad

Open tgregg opened this issue 6 years ago • 0 comments

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.

tgregg avatar Dec 05 '18 22:12 tgregg