Maybe I’m wrong, but isn’t the catching thrown error anti-pattern?:
- Avoid using exceptions for control-flow
- Avoid working with invalid data
Also you can use the result library, for example this a way.
Maybe I’m wrong, but isn’t the catching thrown error anti-pattern?:
- Avoid using exceptions for control-flow
- Avoid working with invalid data
Also you can use the result library, for example this a way.