The Robertson Team


 

 
 
 
 
 
  Programmers' Tools >  The Free Stuff >  Free ColdFusion Tutorials >  How Do I Do An Error Handler? >  Listing 1
 

Listing 1

<cfswitch expression="#cgi.Server_Name#">
   <cfcase value="mydomain.com,anotherdomain.com">
      <cfparam 
         name="request.dumpMode" 
         default="STANDARD" 
         type="string">
      <cfscript>
      request.emailTo="geek@mydomain.com";
      request.emailFrom="geek@mydomain.com";
      request.emailServer="mail.mydomain.com";
      </cfscript>
      <cfinclude template="dumpmonger.cfm">
      <cfinclude template="error_dsp01.cfm">
      </cfcase>
   <cfcase value="yetanotherdomain.com">
      <cfparam 
         name="request.dumpMode" 
         default="ONSCREEN" 
         type="string">
   </cfcase>
   <cfdefaultcase>
      <cfparam 
         name="request.dumpMode" 
         default="SECURE" 
         type="string">
      <cfscript>
      request.emailTo="jester@foohbar.gov";
      request.emailFrom="jester@foohbar.gov";
      request.emailServer="mail.foohbar.gov";
      </cfscript>
      <cfinclude template="dumpmonger.cfm">
      <cfinclude template="error_dsp02.cfm">
   </cfdefaultcase>
</cfswitch>


The Robertson Team, TheKing@mysecretbase.com
1.559.360.1717 


HostMySite.com is a leader in ColdFusion web hosting and managed dedicated servers.