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

3 years ago by Zadyra to c/programmerhumor

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

load all comments
sellingspams -6 points 3 years ago

This can't compile, can it? Only a madman commits code which doesn't compile.

path: 0 298083, hotness: undefined, score: -6, children: 2
Jaloopa 10 points 3 years ago

Why wouldn't it? It's syntactically valid C#, with the added bonus of destroying the stack trace

path: 0 298083 300395, hotness: undefined, score: 10, children: 1
Keelhaul 1 point 3 years ago

Who needs stack traces anyway? Just search all of your code on the word throw until you have the right one

path: 0 298083 300395 314236, hotness: undefined, score: 1, children: 0
programmerhumor
programmerhumor

@lemmy.ml

login for more options
43743
1627
1185

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

go to feed...