Error refactoring #138
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
GeoZero has one
Error
enum, and many of the values areString
objects that contain the actual error information, sometimes formatted.I think it would better to refactor it so that each specific error can be easily analyzed without any extra performance cost.
Proposed structure
Each one of the sub-errors are their own enums with the actual values. So instead of this in
src/mvt/mvt_reader.rs
:we will have this:
Note that thiserror has
#[from]
to simplifyMvtError -> GeozeroError
conversion.Existing errors
Here are all the error usages at the moment (some of these are used multiple times)
The text was updated successfully, but these errors were encountered: