Whatever message this page gives is out now! Go check it out!
<cffunction name="onMissingTemplate" returnType="boolean"> <cfargument type="string" name="targetPage" required=true/> ... <cfreturn BooleanValue /> </cffunction> |
| Parameter | Description |
targetPage | The path from the web root to the requested CFML page. |
<!--- The web.xml welcome-file-list includes index.cfm. To allow web browsing, specify index.cfm in This.welcomFileList. ---> <cfset This.welcomeFileList="index.cfm"> <cffunction name="onMissingTemplate"> <cfargument name="targetPage" type="string" required=true/> <!--- Use a try block to catch errors. ---> <cftry> <!--- Log all errors. ---> <cflog type="error" text="Missing template: #Arguments.targetPage#"> <!--- Display an error message. ---> <cfoutput> <h3>#Arguments.targetPage# could not be found.</h3> <p>You requested a non-existent ColdFusion page.<br /> Please check the URL.</p> </cfoutput> <cfreturn true /> <!--- If an error occurs, return false and the default error handler will run. ---> <cfcatch> <cfreturn false /> </cfcatch> </cftry> </cffunction> |