saalfeldlab / paintera

GNU General Public License v2.0
100 stars 17 forks source link

Error message confusing when maxId is not specified. #338

Closed hanslovsky closed 4 years ago

hanslovsky commented 4 years ago

The error message when a dataset without maxId is deserialized is confusing:

Caused by: org.janelia.saalfeldlab.util.n5.N5Helpers$MaxIDNotSpecified: maxId not specified in attributes.json

It is not clear that this is the attributes.json of the dataset (or the dataset may be HDF5, which does not have an attributes.json). Change exception message to something like

Attribute `maxId' not specified for dataset `<dataset>' in container `<container>'

https://github.com/saalfeldlab/n5-hdf5/pull/6 would need to be merged (and released) to produce a meaningful message for the container if HDF5 is used.

cc @pgunn @axtimwalde