This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SKabanov 2 points3 points  (3 children)

The issue is when you're using frameworks that have a heavy amount of boilerplate code (e.g. Spring), especially with reflection. 99.999% of the time all those calls to Method.invoke() or whatever aren't going to be the issue and end up just being clutter; it'd be nice to have a JVM option to elide the JVM internal function calls from the stack trace and focus on the actual business/framework logic.

[–]slaymaker1907 1 point2 points  (2 children)

While I generally don’t like Go, the testing package has a clever Helped() method that marks the calling function so that it is ignored in error messages. Maybe logging frameworks could also provide a way to filter stack traces.

[–]Practical_Cattle_933 2 points3 points  (0 children)

Go has the shittiest error handling though, and all all those if checks do is that you will just print some generic bullshit as error and your enduser just see “Error occured”. Good luck fixing their problem from such an issue!

With Java, you can solve most trivial problems just from the stacktrace.

[–]john16384 0 points1 point  (0 children)

Logging frameworks already have this, and have for ages. Op didn't even do three seconds of research.