Allow creation of HandlerExecutionExceptions without stacktrace
See original GitHub issueEnhancement Description
Since HandlerExecutionExceptions
are essentially carriers for error codes, their stacktrace is not of great value in common scenarios of passing error codes between JVMs. For this reason, I think it would be sensible to add the writableStackTrace
parameter to the constructors of HandlerExecutionExceptions
. That way a programmer can decide if stacktrace is important enough to pay the penalty of creating it.
Related discussion with a bit more details: https://discuss.axoniq.io/t/handlerexecutionexception-stacktrace-necessary/3453
Current Behaviour
At the moment there is no writableStackTrace
parameter in the API of HandlerExecutionException
constructors.
Tnx
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Exception without stack trace in Java
Fills in the execution stack trace. This method records within this Throwable object information about the current state of the stack frames ...
Read more >How to remove stacktraces on error · Issue #663 · remkop/picocli
I'm trying to use picocli, but when I have a business exception, it is encapsulated inside ExecutionException. A stracktrace is printed out, ...
Read more >HandlerExecutionException stacktrace necessary?
Usually, stacktrace is created implicitly for all Java exceptions, unless disabled explicitly via a constructor parameter. In the source code of ...
Read more >Best Practices for exceptions - .NET - Microsoft Learn
Learn best practices for exceptions, such as using try/catch/finally, handling common conditions without exceptions, and using predefined .
Read more >Complete Guide to Exception Handling in Spring Boot
This article showcases various ways to handle exceptions in a Spring Boot Application.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing this issue, as it has been resolved in pull request #1905. Thanks for drafting up the description and for providing the solution @dmurat!
Here is the PR proposal: https://github.com/AxonFramework/AxonFramework/pull/1905 Tnx