Zadyra@kbin.social to Programmer Humor@lemmy.ml · 1 year agoBrilliant exception handling I found in an app i had to work onmedia.kbin.socialimagemessage-square5fedilinkarrow-up111arrow-down11file-text
arrow-up110arrow-down1imageBrilliant exception handling I found in an app i had to work onmedia.kbin.socialZadyra@kbin.social to Programmer Humor@lemmy.ml · 1 year agomessage-square5fedilinkfile-text
minus-squareTwilightKiddy@programming.devlinkfedilinkarrow-up1·1 year agoRethrowing caught exception in C# is just throw;, not throw ex;. This will delete old stack trace, which is very punishable if someone debugs your code later and you’re still around.
Rethrowing caught exception in C# is just
throw;
, notthrow ex;
. This will delete old stack trace, which is very punishable if someone debugs your code later and you’re still around.