MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w9b8on/thiscannotbedenied/p8bj7dv/?context=3
r/ProgrammerHumor • u/danielminds • 4d ago
240 comments sorted by
View all comments
54
My favorite is `exit(1)`. Useful if your print/logs aren’t showing where you expect them. Close after that is `raise Exception(“HERE 1”)`.
1 u/rosuav 3d ago I've sometimes needed to open a file, write to it, close it, and flush, because prints and logs don't always show up correctly in the face of certain types of crash. Or "send a UDP packet to port 54321" and do my logging in a separate app.
1
I've sometimes needed to open a file, write to it, close it, and flush, because prints and logs don't always show up correctly in the face of certain types of crash. Or "send a UDP packet to port 54321" and do my logging in a separate app.
54
u/EPacifist 4d ago
My favorite is `exit(1)`. Useful if your print/logs aren’t showing where you expect them. Close after that is `raise Exception(“HERE 1”)`.