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.

 
GeneralEverywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 20:28 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pinmembercjb11019-Jun-13 21:13 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 21:20 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberRob Grainger24-Jun-13 0:02 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberJarek Kruza19-Jun-13 21:56 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 22:08 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberJarek Kruza20-Jun-13 1:30 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberRob Grainger24-Jun-13 0:04 
I'd tend to have exception-handling code mostly in one place, for example in a "SaveRecord" method - any exceptions raised in methods invoked by this can be caught here.
 
Putting exception-handling code in every method is overkill and leads to code being harder to read and maintain.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.

GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed24-Jun-13 0:31 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberChris Ross 224-Jun-13 2:32 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberRob Grainger24-Jun-13 4:08 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalV.19-Jun-13 23:25 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed19-Jun-13 23:56 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. Pinmembercjb11020-Jun-13 0:12 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed20-Jun-13 0:26 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalV.20-Jun-13 0:31 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed20-Jun-13 1:11 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalRichard Deeming20-Jun-13 1:36 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalV.20-Jun-13 1:39 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinmemberAnalogNerd24-Jun-13 2:26 
GeneralRe: Everywhere a single Catch block used catching top Exception all times. PinprofessionalMohammed Hameed24-Jun-13 2:37 
GeneralRelational database reinvented as a flat file... Pinmemberjohnsyd19-Jun-13 19:58 
GeneralRe: Relational database reinvented as a flat file... PinprofessionalAlexCode19-Jun-13 20:25 
GeneralRe: Relational database reinvented as a flat file... Pinmemberjohnsyd19-Jun-13 21:22 
GeneralRe: Relational database reinvented as a flat file... PinprofessionalNormDroid19-Jun-13 20:43 

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
Web02 | 2.8.141022.2 | Last Updated 25 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid