-
Notifications
You must be signed in to change notification settings - Fork 418
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
Cause exception not printed by default execution exception handler #1048
Comments
Sorry for the bug introduced. Working on a permanent fix. |
One easy fix would redirect all the output from ex.printStackTrace() to a string, as proposed in #845. However, doing so may harm the ability to split exception messages from stack traces. |
Seems extend StringWriter to write Style.on() before and Style.off() after is one viable solution. Testing locally. |
This commits tries to fix remkop#1048. The bug is caused by re-implementing printStackTrace() method on our own. Here, by using the original implementation, the causes can be printed as intended. By extending StringWriter, exceptions messages and stack traces can be separated, then applied to different styles.
This commits tries to fix remkop#1048. The bug is caused by re-implementing printStackTrace() method on our own. Here, by using the original implementation, the causes can be printed as intended. By extending StringWriter, exceptions messages and stack traces can be separated, then applied to different styles.
Thanks for the help! About the terminals, there is not much we can do about that in the application. The best we can do is select colors and styles that look acceptable in most consoles. (Which I think we did.) :-) |
Sorry for the bug introduced! Hope 4.3.2 will be the last patch version of 4.3, and wish everything goes well! |
No worries! |
When an exception occurs in the business logic, this is handled by the execution exception handler. By default, this prints the full stack trace of the exception.
Since 4.3.0, only the stack trace of the "outer" exception is printed. If that exception has any "cause" exceptions, these are incorrectly omitted.
With the work done in #484, #845 and #1008 (colors in exception handler), we no longer call
exception.printStackTrace()
but instead have a custom implementation that has the same effect but uses ANSI colors. This implementation incorrectly omits the stack trace for any nested "cause" exceptions (and their nested cause, if any).A workaround is to register a custom execution exception handler as follows:
The text was updated successfully, but these errors were encountered: