question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow creation of HandlerExecutionExceptions without stacktrace

See original GitHub issue

Enhancement Description

Since HandlerExecutionExceptionsare 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
smcvbcommented, Aug 10, 2021

Closing this issue, as it has been resolved in pull request #1905. Thanks for drafting up the description and for providing the solution @dmurat!

1reaction
dmuratcommented, Aug 7, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found