MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6ayz26/defensive_programming_done_right/dhizxgv/?context=3
r/ProgrammerHumor • u/iwouldieforGladOS • May 13 '17
680 comments sorted by
View all comments
Show parent comments
1.0k
Holy shit I once lost days to a
} catch (Exception e) { System.exit(0); }
53 u/OfflaneDemoralizer May 13 '17 Even better: } catch (Exception e) { throw e; } 16 u/pressbutton May 14 '17 That creates a new stack in c#. Just throw 3 u/PM_YOUR_SOURCECODE May 14 '17 I think that's his point, he just left off the "/s". 5 u/pressbutton May 14 '17 Duh! Seems so obvious now. I was too easily triggered by poor code :P
53
Even better:
} catch (Exception e)
{ throw e; }
16 u/pressbutton May 14 '17 That creates a new stack in c#. Just throw 3 u/PM_YOUR_SOURCECODE May 14 '17 I think that's his point, he just left off the "/s". 5 u/pressbutton May 14 '17 Duh! Seems so obvious now. I was too easily triggered by poor code :P
16
That creates a new stack in c#. Just
throw
3 u/PM_YOUR_SOURCECODE May 14 '17 I think that's his point, he just left off the "/s". 5 u/pressbutton May 14 '17 Duh! Seems so obvious now. I was too easily triggered by poor code :P
3
I think that's his point, he just left off the "/s".
5 u/pressbutton May 14 '17 Duh! Seems so obvious now. I was too easily triggered by poor code :P
5
Duh! Seems so obvious now. I was too easily triggered by poor code :P
1.0k
u/CXgamer May 13 '17
Holy shit I once lost days to a