JPDev@programming.dev to Programmer Humor@programming.dev · 1 year agoifn'tprogramming.devimagemessage-square108linkfedilinkarrow-up1696
arrow-up1686imageifn'tprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 1 year agomessage-square108linkfedilink
minus-squaregex@lemmy.worldlinkfedilinkarrow-up55·1 year agoSome C++ style guides suggest the following naming convention for functions that crash on any error OpenFileOrDie()
minus-squareKissaki@programming.devlinkfedilinkEnglisharrow-up10·1 year agoPersonally, I like to call catched exception variables up, so for a rethrow I can throw up;.
minus-squareTwilightKiddy@programming.devlinkfedilinkarrow-up2·1 year 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·1 year 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·1 year agoI mean, it makes sense to call ComplainToErrorAndExit just ‘die’, no?
minus-squareOpenStars@startrek.websitelinkfedilinkEnglisharrow-up4arrow-down1·1 year 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)
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();
?