Live data from Hacker News

Show HN: Decorate Java stack traces with source code snippets

github.com

1–10 of 22 posts

Re: Show HN: Decorate Java stack traces with source code snippets

#4
Very cool work!

Some unsolicited opinion: One potential code pet peeve i always have is that the overloads being used in java serves no purpose, but makes the code super confusing to read without using an IDE.

For example, https://github.com/laech/java-stacksrc/blob/main/core/src/ma... , which is code to decorate the stacktrace element, calls the function `decorate`. However, there's several overloads, all named decorate! It is certainly a better naming convention to call it `decorateElement` imho.

Re: Show HN: Decorate Java stack traces with source code snippets

#6
Thanks for publishing. From the title was expecting that we'd get the code snippet related to the code itself, rather than the junit where the code failed.

But I guess for such feature to be possible you'd have to pack the source code inside the jar itself.

Re: Show HN: Decorate Java stack traces with source code snippets

#8

Thanks for publishing. From the title was expecting that we'd get the code snippet related to the code itself, rather than the junit where the code failed. But I guess for such feature to be possible you'd have to pack the source code inside the jar itself.

Just tested it, and it does print code snippets of the related code of the source code of my project, and not just of the test itself.
Post reply on HN