this post was submitted on 17 Jun 2023
36 points (100.0% liked)

Programmer Humor

854 readers
4 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

Brilliant exception handling I found in an app i had to work on

you are viewing a single comment's thread
view the rest of the comments
[–] TwilightKiddy@programming.dev 2 points 1 year ago

Rethrowing 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.