this post was submitted on 04 Mar 2024
333 points (99.7% liked)

196

16293 readers
37 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] DrCake@lemmy.world 51 points 7 months ago (7 children)

If else to return true or false? I think I need a shower after reading that code

[–] hummas@lemmy.blahaj.zone 18 points 7 months ago (5 children)

I’m even more disturbed by the try catch that will never catch anyway. Most disturbing is the absolute heresy that is the throw within the catch. …is vibe even defined here??? I think I need to reconsider my major.

[–] DinosaurSr@programming.dev 16 points 7 months ago (4 children)

Catching and rethrowing just to log the error is a valid use of a try catch IMO

[–] hummas@lemmy.blahaj.zone 1 points 7 months ago

Kind of a knee-jerk reaction to it on my part, plus I’ve got personal bias against exceptions (errors as values my beloved). The worst thing is that thinking about this code has managed to take time I could’ve used being non-productive with my own projects smh.

load more comments (3 replies)
load more comments (3 replies)
load more comments (4 replies)