Miriam Hirschman wrote:
> How Do I define my own error in a cfthrow? I would like to say if the error
> is an invalid search criteria then....
Try something like this:
<CFTRY>
<CFIF SearchCriteria IS Invalid>
<CFTHROW TYPE="MyCustomError" MESSAGE="Your Search Criteria are Invalid">
</CFIF>
<CFCATCH TYPE="MyCustomError">
#CFCATCH.Message#
</CFCATCH>
</CFTRY>
Basically the idea is to wrap the CFTHROW in conditional code so that it creates an
error
when certain conditions are met. You then "catch" the error by referring to it with
the
TYPE parameter using CFCATCH, and display the defined error message using
CFCATCH.Message
(and CFCATCH.Detail, if you define that as well).
Gene Kraybill
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.