Click here to Skip to main content
15,885,216 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: CCC 2021-03-30: solution Pin
Vikram A Punathambekar31-Mar-21 6:28
Vikram A Punathambekar31-Mar-21 6:28 
GeneralOi! Greg Utas! Pin
OriginalGriff29-Mar-21 23:44
mveOriginalGriff29-Mar-21 23:44 
GeneralRe: Oi! Greg Utas! Pin
pkfox29-Mar-21 23:54
professionalpkfox29-Mar-21 23:54 
GeneralWell, I'm way better than yesterday. Pin
OriginalGriff29-Mar-21 21:52
mveOriginalGriff29-Mar-21 21:52 
GeneralRe: Well, I'm way better than yesterday. Pin
pkfox29-Mar-21 22:20
professionalpkfox29-Mar-21 22:20 
GeneralRe: Well, I'm way better than yesterday. Pin
Rage29-Mar-21 23:46
professionalRage29-Mar-21 23:46 
GeneralRe: Well, I'm way better than yesterday. Pin
Rich Leyshon30-Mar-21 0:30
Rich Leyshon30-Mar-21 0:30 
GeneralSome C# code that makes me sick... PinPopular
Super Lloyd29-Mar-21 15:10
Super Lloyd29-Mar-21 15:10 
Thankfully I have a robust constitution and delete it viciously...

But I thought I should purge here for all to see!

The kind of code below makes me sick to the bone... When I see it I need to immediately incinerate this try/catch never to be caught again!
C#
try {
  DoX();
}
catch (Exception ex) {
  throw new Exception("Having problem Doing X!", ex);
}

And don't give me the horseradish about "but they use this opportunity to do logging and stuff". I mean this exact code above! No additional stuff! Blush | :O

And speaking of logging, I have seen such try/catch/logging being nested zillion of time resulting in zillion of log entry for one single exception... yuk... Sigh | :sigh:

All of that can surmised with this simple hypothetical dialog
Q: (Newbye Dev) How do I throw an exception in case of exception?
A: (Captain Obvious) Just don't catch the goddamn exception you donkey!
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!


modified 29-Mar-21 22:17pm.

GeneralRe: Some C# code that makes me sick... PinPopular
honey the codewitch29-Mar-21 19:31
mvahoney the codewitch29-Mar-21 19:31 
AnswerRe: Some C# code that makes me sick... Pin
Super Lloyd29-Mar-21 21:38
Super Lloyd29-Mar-21 21:38 
GeneralRe: Some C# code that makes me sick... Pin
Rage29-Mar-21 23:48
professionalRage29-Mar-21 23:48 
GeneralRe: Some C# code that makes me sick... Pin
Super Lloyd30-Mar-21 0:26
Super Lloyd30-Mar-21 0:26 
GeneralRe: Some C# code that makes me sick... Pin
milo-xml31-Mar-21 10:09
professionalmilo-xml31-Mar-21 10:09 
JokeRe: Some C# code that makes me sick... PinPopular
Sander Rossel29-Mar-21 19:50
professionalSander Rossel29-Mar-21 19:50 
GeneralRe: Some C# code that makes me sick... Pin
Super Lloyd29-Mar-21 21:39
Super Lloyd29-Mar-21 21:39 
GeneralRe: Some C# code that makes me sick... Pin
Member 1488595529-Mar-21 22:17
Member 1488595529-Mar-21 22:17 
GeneralRe: Some C# code that makes me sick... Pin
dandy7230-Mar-21 3:14
dandy7230-Mar-21 3:14 
GeneralRe: Some C# code that makes me sick... Pin
Sander Rossel30-Mar-21 11:08
professionalSander Rossel30-Mar-21 11:08 
GeneralRe: Some C# code that makes me sick... Pin
Dean Allcorn29-Mar-21 20:44
Dean Allcorn29-Mar-21 20:44 
GeneralRe: Some C# code that makes me sick... Pin
Richard Deeming29-Mar-21 21:48
mveRichard Deeming29-Mar-21 21:48 
GeneralRe: Some C# code that makes me sick... Pin
Super Lloyd30-Mar-21 0:29
Super Lloyd30-Mar-21 0:29 
GeneralRe: Some C# code that makes me sick... Pin
Richard Deeming30-Mar-21 0:44
mveRichard Deeming30-Mar-21 0:44 
GeneralRe: Some C# code that makes me sick... Pin
Super Lloyd30-Mar-21 1:07
Super Lloyd30-Mar-21 1:07 
GeneralRe: Some C# code that makes me sick... Pin
dandy7230-Mar-21 3:17
dandy7230-Mar-21 3:17 
GeneralRe: Some C# code that makes me sick... Pin
MSBassSinger30-Mar-21 3:56
professionalMSBassSinger30-Mar-21 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.