It was less a preference question then it was a question of industry 
standard practices and efficiency. Just because I like to code ahead of 
errors doesn't make it more efficient than a try/catch. I wanted to hear 
what others said, what links they brought up, etc. The links to Dave Shuck's 
blog is very interesting, especially to those who have not seen it before. 
Of course, it brings up the issue of test methodology and code actually 
used, but the point is still there. We're getting better info on the subject 
and new techniques.
That oracle ping query was rather interesting and I wonder if MSSQL has an 
equivalent without a lot of overhead (i.e. no overhead at all).


> Michael,
>
> CF-TALK not getting enough traffic today so you post a "preference"
> question? ;)
>
> For what it's worth, I *PREFER* direct error handling because I think
> it's more flexible.
>
> You wrote the following code:
> <CFIF Not IsDefined('ID')>
> An ID is needed
> <CFELSEIF Not IsNumeric(ID)>
> The passed ID needs to be numeric
> </CFIF>
>
> I'd probably actually do:
>
> <CFIF Not IsDefined('ID')>
> <cflocation url="someotherpage.cfm">
> <CFELSEIF Not IsNumeric(ID)>
> The passed ID needs to be numeric
> </CFIF>
>
> Generally because if an ID is required on a page, and none was passed
> in, I'm just gonna send them to a different page.. but if an invalid ID
> was passed I might want to show an error.
>
> I think in order to do *THAT* you'd have to write a lot more code using
> cftry/cfcatch.
>
> rick
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232370
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to