Elektrine lite

← Feed

@Goretantath@lemmy.world

Post #1536105

2026-02-03 19:44 UTC

It'd be nice if the console just plainly flat out told what happened instead of being obfuscated in the first place so I could quickly do it myself without having to ask for help..

Replies (6)

  • @ilinamorato@lemmy.world 2026-02-03 20:07

    Speaking as a software engineer, that's always the goal! In all actuality, though, if the program *knew* what happened, it could probably self-correct. When you're getting stack traces, it's the computer saying, "I dunno, I can't make head nor tail of this mess, and if I keep going something's going to break, so YOU figure it out." It's not intentionally obfuscated, it's telling you exactly what the problem is from its perspective. If I gave you directions to meet me at a place you weren't familiar with, but I gave you the wrong directions, when you called me you wouldn't be like, "hey, just so you know, I turned left on 5th Street when I should've turned right." If you knew that, you'd just go back to 5th and turn the other way. You'd call me and say, "so I have no idea where I am. Your directions say to turn left here, but if I do that I'll literally walk into the ocean and I'm pretty sure I see sharks in the water. There's a statue of a sea horse on my right, and I passed a Shake Shack about two blocks back." That's what a stack trace is. It's supposed to be a message to the developer, not to the user. The developer should get the stack trace and either fix the problem that led to that issue in the first place, or add better error handling so that when it fails the program can tell you in more plain language what to do.

    Open ##1536118

  • @trxxruraxvr@lemmy.world 2026-02-03 20:08

    It does. It clearly says `java.lang.NoSuchMethodError`. If that's too complicated for you, you still need help.

    Open ##1536119

  • @webghost0101@sopuli.xyz 2026-02-03 19:57

    The code to handle errors would be so bloated to deal with every conceivable and inconceivable situation you will get errors on your errors. The computer is as helpful as it can be with what little context it knows of what was going on. Mostly it just knows that codeline 123 went fine and 124 went not.

    Open ##1536120

  • @oxysis@lemmy.blahaj.zone 2026-02-03 19:53

    That’s what fabric mod loader does! It tries to diagnose the issue for you by checking for incompatibilities and missing dependencies. It actually gets most of the problems with mod packs pretty quickly

    Open ##1536122

  • @Zos_Kia@lemmynsfw.com 2026-02-04 10:48

    Yeah Minecraft crash logs are notoriously hard to debug, part of it is caused by Mojang obfuscating the classes but also because java naturally produces verbose stack traces

    Open ##1536124

  • @luciferofastora@feddit.org 2026-02-04 07:09

    IDK how idiomatic it still is, but I was taught to differentiate between Exceptions and Errors, where any recoverable Exception is to be logged and handled gracefully and only the truly unforeseen or fatal issues end up actually killing the execution. And for unforeseen errors, it's kinda hard to construct a helpful error message, given you might not know just what info to include. (Of course, proprietary obfuscation adds another significant hurdle, but I suspect even without obfuscation, you might not be able to do much about closed-source code. That's an argument against closed-source code, in my opinion, but I don't think I need to preach to the choir here.)

    Open ##1536125