[reader] use `std::optional` instead of throwing
Closed this issue · 1 comments
dglaeser commented
Currently, the optional reader interfaces (extents, etc, which are special to structured grids), throw in the default implementation in the base reader. We could change this to returning std::optional
s. This would allow users to write logic compatible with both structured and unstructured formats without the need for try/catch
blocks.
dglaeser commented
Closing this because:
The semantics when instantiating a reader bound to a specific format, e.g. vti
are much better when not using optional
. It would be arbitrary that in this case some interfaces return optional, while some return values directly.