BlackSheep icon indicating copy to clipboard operation
BlackSheep copied to clipboard

Ability to set a single handler for all exceptions that inherit from a base exception

Open YassineElbouchaibi opened this issue 3 years ago • 2 comments

🚀 Feature Request

Ability to set a single handler for all exceptions that inherit from a base exception. However, the exception handler mapper would need to always resolve to the youngest descendant for an exception.

This is useful when using a third party library which has a lot of specific exceptions that you want to handle in the same way.

If this is deemed useful for everyone and implemented before : #186, then I believe #186 could be closed as one could set a handler for Exception which would always be called last if there is no handler for the rest of the exception's hierarchy.

YassineElbouchaibi avatar Jul 18 '21 17:07 YassineElbouchaibi

This is another very good recommendation, we will look into this and see if it creates any side effect - but I don't think so. I think #186 would make sense in any case. :)

RobertoPrevato avatar Jul 19 '21 08:07 RobertoPrevato

Good suggestion, I love it!

myusko avatar Jul 19 '21 15:07 myusko