You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, none of them seem to explain what exactly a stack trace is, how to read it and how to find out where the issue is.
I frequently see new Java users (e.g. students) being confused by (especially bigger) stack traces with no idea on how to debug them.
While this Stack Overflow post explains it quite well, I think this is a good fit and would be a helpful article (especially for referencing it to new Java developers).
I would like such an article to contain the following:
What is a stack trace?
When is a stack trace displayed on the console (or in other logs)?
What is a Caused By section?
What is a Suppressed section?
What should people look at/focus on when reading (bigger) stack traces?
Differentiating between own code and other code (in frameworks)
Why is it often a bad idea to use System.out.println("error"); instead of e.printStackTrace(); (or re-throwing) in a catch-block for exceptions that shouldn't happen?
It might be possible to mention this article in the Stack Overflow post mentioned above.
However, it's probably a good idea to first ask on Meta Stack Overflow before whether this is OK for them since they consider any sort of undisclosed affiliation as spam but I'm fairly certain they should be fine with an official article. I can do that if necessary.
Furthermore, we are probably able to use a link to that article in our JUG when people ask about stack traces.
Should this be closed now that #87 is held off or should this issue be kept open (with the progress label removed)?
I don't know about the exact plans for content on stack traces.
Activity
carimura commentedon Nov 1, 2023
Great! Also if you find places in existing content where we can reference this new article, let us know!
danthe1st commentedon Nov 1, 2023
It might be possible to mention this article in the Stack Overflow post mentioned above.
However, it's probably a good idea to first ask on Meta Stack Overflow before whether this is OK for them since they consider any sort of undisclosed affiliation as spam but I'm fairly certain they should be fine with an official article. I can do that if necessary.
Furthermore, we are probably able to use a link to that article in our JUG when people ask about stack traces.
carimura commentedon Jan 23, 2024
hi @danthe1st was this ever worked on?
danthe1st commentedon Jan 23, 2024
@carimura I don't know of anything being done with respect to this issue.
carimura commentedon Apr 26, 2024
Would you like to work on it? :)
danthe1st commentedon Apr 26, 2024
I actually wanted to ask for that recently. So yeah, I would be interested to work on that if I find time.
carimura commentedon Apr 26, 2024
sounds good. trying to organize content "in flight" with a new label. no rush. :)
danthe1st commentedon May 5, 2024
Should this be closed now that #87 is held off or should this issue be kept open (with the progress label removed)?
I don't know about the exact plans for content on stack traces.