Click here to Skip to main content

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrasing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Something is not as I expected PinmemberRob Grainger24-Jun-13 0:57 
GeneralRe: Something is not as I expected PinmemberMember 467320212-Jul-13 14:11 
GeneralEverywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 21:28 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pinmembercjb11019-Jun-13 22:13 
Doesn't that go against the whole point of exception handling? try/catch is not equivalent of VB's On Error Goto.
 
Also if the code breaks all the time then its hardly an 'exception' is it?
 
And debugging must be a pain, as VS will break in catch block, not where the error occurred wont it?
 
How many of these catch blocks are entered on regular operation? Exceptions aren't cheap to throw after all.
 
Also is a try/catch block 'free' of any performance/memory penalty?
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 22:20 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberRob Grainger24-Jun-13 1:02 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberJarek Kruza19-Jun-13 22:56 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 23:08 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberJarek Kruza20-Jun-13 2:30 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberRob Grainger24-Jun-13 1:04 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 29 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid