This content has been marked as final. Show 3 replies
What about using the CFTRY/CFCATCH method, then doing a CFLOCATION to your sitewide error handler with CFCATCH.SQL in the URL:
Be sure to wrap this in <CFOUTPUT></CFOUTPUT>
I'm not able to wrap all the site wide queries with cftry and cfcatch handlers. Some have it but there are far too many to do that for all of them. Maybe I missed your point/suggestion. But thanks anyway.
You don't have to place a CFTRY/CFCATCH around each query. I don't know how many pages you have in your application, but you could do something like the following:
1. Replace <body> with <body><CFTRY>
2. Replace </body> with the following
<CFMODULE TEMPLATE="customErrorPage.cfm" sqlStatement="#CFCATCH.Sql# " message="#CFCATCH.message#">
You can use a global search-and-replace utility, such as SR32, to make this task painless. Click here to go to the SR32 site.