In other words it's ok to release software which is broken/incomplete or not properly configured cos the poor sap who buys it can mop up after you? No need to program and thoroughly test, chaps. We'll let the Try/Catch get us out of any scrapes.How would anyone ever fix anything if no error message details were displayed? A lot of the time the error message details are not aimed at the end user, they are aimed at the system admin that will be getting a phone call as soon as the user sees an error pop up.
I rest my case!I'll be honest I'm not a big fan of checking exception types, because at the end of the day there are a hell of a lot of possible exception types to potentially catch and they don't really narrow it down that much.
Try/Catch should only ever be used for circumstances beyond the user's control; dropped internet connections, missing files, server collapse and the like. It's not there to clean up sloppy programming for you or as a catch all failsafe for your failure to thoroughly test an application on all relevant platforms. If you're prepared to let software leave the building that may still fail in circumstances very much under your control, I would have thought the last thing you'd want to do would be to let admins have the full error message and work out exactly where you went wrong!
To quote the great Michael Flanders on the news that the UK was introducing an annual MOT test for cars ...
So they've brought in this law where you have to have you car tested every year. It used to be every three years. Now it's one. There's even some talk of having them tested before they leave the factory but I don't suppose that'll ever catch on!




Reply With Quote