Error handling #2007
martinralfreindl
started this conversation in
Ideas
Error handling
#2007
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @Milad-Akarie and other auto_route enjoyers ,
Situation
I've been using auto-route for a while and overall love the package ❤️ .
Complication
While lots of things about auto_route are amazing, one thing I would love to see a bit more of is some more advanced error handling. In particular, I have two main gripes:
Question
Would it be possible to make error handling more mature?
Suggested Answer
I would love to see improved error handling in which we have the following features:
Add AutoRouteException: these are thrown whenever an exception occurs. An AutoRouteException passes information on:
Add AutoRouteError: This gets thrown whenever our routingConfig, routes tree, etc are incorrect.
Add global onError callback to the AutoRouterConfig that allows us to handle what happens when a AutoRouteException is thrown (two options here in my mind)
To be fully honest, the above approach is heavily adapted on go_routers approach. That could certainly be an inspiration.
Anyway - thanks as always Milad. Would love to get your thoughts on the above.
Beta Was this translation helpful? Give feedback.
All reactions