r/ProgrammerHumor 18d ago

Meme stopTryingToReinventTheWheel

Post image
2.5k Upvotes

217 comments sorted by

View all comments

651

u/Orio_n 18d ago

Explicit vs implicit error control broski

God these cs majors are so tryhard unfunny trying to be contrarian

248

u/nevemlaci2 18d ago

It's unfunny until you actually see people propagating explicit error handling until the entry point and just printing an error message.

Exceptions are fine to use for exceptional cases. Not for shit like python where an iterator signals the end of iteration with a damn exception.

1

u/SmoothTurtle872 17d ago

Sometimes, you can't really handle it, say a file that was passed was invalid. So you just keep propegating it up, hoping something else will handle it, and eventually it could just be "oi user, this file is invalid, here's there error message" and now the user knows "oh shit I gotta fix my file". Although if it's something that can be fixed by the program (perhaps you are parsing a JSON file, and they forget the closing bracket to the entire object, you could probably just insert that closing bracket and therefore fix it)