Often times we get cases where we need the complete stack trace of an error and not what is reported by any custom error handler template.
Here is a great way to track your errors that also allows inspection of the entire cfcatch structure at a later time, without interfering with any custom templates.
2 <cfinclude template="asdfasdf.cfm">
3<cfcatch type="any">
4<cfdocument filename="errorreport#gettickcount()#.pdf" format="pdf">
5 ColdFusion Error<br />
6 <cfdump var="#cfcatch#">
7</cfdocument>
8</cfcatch>
9</cftry>
In the above code I create a missing template exception, then have the cfcatch simply use cfdocument with a unique filename, to dump out the cfcatch to a PDF file.
You can adjust the location etc as you see fit of course.
The result is a PDF for every occurence showing the complete error and hopefully allowing you to quickly get to a resoluiton.


Logs are simple text files for a reason!
The file approach was something that makes it easy to email specific errors
Thanks for your feedback.