JPDev@programming.dev to Programmer Humor@programming.dev · 10 months agoifn'tprogramming.devimagemessage-square110fedilinkarrow-up1706arrow-down110
arrow-up1696arrow-down1imageifn'tprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 10 months agomessage-square110fedilink
minus-squaregex@lemmy.worldlinkfedilinkarrow-up55·10 months agoSome C++ style guides suggest the following naming convention for functions that crash on any error OpenFileOrDie()
minus-squareKissaki@programming.devlinkfedilinkEnglisharrow-up10·10 months agoPersonally, I like to call catched exception variables up, so for a rethrow I can throw up;.
minus-squareTwilightKiddy@programming.devlinkfedilinkarrow-up2·10 months agoExcept rethrowing an exception in C# is just throw;, anything else is a crime against the person who reads your stacktraces.
minus-squareVorthas@programming.devlinkfedilinkarrow-up4·10 months agoOne of the modules in a project I’m working on is called VulkanOrDie which always makes me crack up when I see it in the compilation messages.
minus-squareMonkderZweite@feddit.chlinkfedilinkarrow-up4·10 months agoI mean, it makes sense to call ComplainToErrorAndExit just ‘die’, no?
minus-squareOpenStars@startrek.websitelinkfedilinkEnglisharrow-up4arrow-down1·10 months agoIt’s funnier when you try to SysCallAndDie() :-P (that’s a real thing in perl btw - I guess that function didn’t get the memo)
minus-squareyum13241@lemm.eelinkfedilinkarrow-up1·10 months agoNow what about GZDoom’s GoAwayAndDie();?
Some C++ style guides suggest the following naming convention for functions that crash on any error
OpenFileOrDie()
Personally, I like to call catched exception variables
up
, so for a rethrow I canthrow up;
.Except rethrowing an exception in C# is just
throw;
, anything else is a crime against the person who reads your stacktraces.One of the modules in a project I’m working on is called
VulkanOrDie
which always makes me crack up when I see it in the compilation messages.I mean, it makes sense to call ComplainToErrorAndExit just ‘die’, no?
It’s funnier when you try to SysCallAndDie() :-P
(that’s a real thing in perl btw - I guess that function didn’t get the memo)
Now what about GZDoom’s
GoAwayAndDie();
?