-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Custom Destructurers for More Exceptions #418
Comments
Just a question: is it worth it? The cost of reflection is negligible and paid just for the first time exception is destructured. The cost is also minuscule compared to the cost of logging anyway. As was thinking even, maybe let's go the other way around, and remove all(or most) custom destructurers we have and leave just reflection-based one? |
We only have a few custom destructurors at the moment. The list above just completes everything built into The cost can add up if you have an app e.g. if you have an app throwing large numbers of |
Hi @RehanSaeed, would you accept a PR that adds a destructurer for RegexMatchTimeoutException? |
@Driedas Sure! |
@RehanSaeed
Imagine my surprise when it turned green instead of red as expected :-). Looks like |
Yes, as you've found it works but requires reflection to output. I'd still accept a PR to add support without using reflection. |
I believe we may be able to do this with a source generator. Worth looking into. |
Describe the feature
To avoid using reflection we can create custom destructurers for more exception types.
ArgumentExceptionDestructurer
is a good example for how to do this.The text was updated successfully, but these errors were encountered: