Zadyra ( Zadyra@kbin.social ) to Programmer Humor@lemmy.ml · 3 years agoBrilliant exception handling I found in an app i had to work onmedia.kbin.socialimagemessage-square8linkfedilinkarrow-up136file-text
arrow-up136imageBrilliant exception handling I found in an app i had to work onmedia.kbin.socialZadyra ( Zadyra@kbin.social ) to Programmer Humor@lemmy.ml · 3 years agomessage-square8linkfedilinkfile-text
minus-squareTwilightKiddy ( TwilightKiddy@programming.dev ) linkfedilinkarrow-up2·3 years 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.