cogeotiff / rio-tiler-mosaic

A rio-tiler plugin for creating tiles from multiple observations.
MIT License
32 stars 6 forks source link

Catch more detailed exceptions #14

Closed kylebarron closed 4 years ago

kylebarron commented 4 years ago

Here you catch all exceptions: https://github.com/cogeotiff/rio-tiler-mosaic/blob/d1add30c65b1ffd08dd82f58be67d5c8d001d7bf/rio_tiler_mosaic/mosaic.py#L30-L34

You should catch more detailed exceptions, i.e. only TileOutsideBounds. I was struggling to get output, and it turns out it was catching a Rasterio error, which should be shown to the user.

RasterioIOError: '/vsis3/naip-analytic/az/2017/60cm/rgbir_cog/36111/m_3611149_se_12_h_20170619.tif' does not exist in the file system, and is not recognized as a supported dataset name.
vincentsarago commented 4 years ago

👋 in #15 I've added logging https://github.com/cogeotiff/rio-tiler-mosaic/blob/8bddfac17df02911ab585e96ffc1ba4e7654a327/rio_tiler_mosaic/mosaic.py#L40-L42

would this be enough?

kylebarron commented 4 years ago

does logging.error always get printed by default?

vincentsarago commented 4 years ago

yeah, I'm not sure about that @kylebarron, I'll need to check

kylebarron commented 4 years ago

I think this is fixed in rio_tiler.mosaic master