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.

 
GeneralSomething is not as I expected PinprofessionalMohibur Rashid19-Jun-13 23:40 
GeneralRe: Something is not as I expected PinmemberAmitosh Swain20-Jun-13 18:53 
GeneralRe: Something is not as I expected PinprofessionalMohibur Rashid20-Jun-13 23:25 
GeneralRe: Something is not as I expected PinmemberAmitosh Swain20-Jun-13 23:32 
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 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed24-Jun-13 1:31 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberChris Ross 224-Jun-13 3:32 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberRob Grainger24-Jun-13 5:08 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalV.20-Jun-13 0:25 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed20-Jun-13 0:56 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pinmembercjb11020-Jun-13 1:12 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed20-Jun-13 1:26 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalV.20-Jun-13 1:31 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed20-Jun-13 2:11 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalRichard Deeming20-Jun-13 2:36 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalV.20-Jun-13 2:39 

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
Web04 | 2.8.1411023.1 | Last Updated 26 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid