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:232367
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