Copy link to clipboard
Copied
I am trying to set up a global error handling page error.cfm so that whenever any error at all occurs I can display my error.cfm page.
At first I tried the following in the application.cfm page, and then ran a page that tried to output a variable that did not exist, and it seemed to work:
<cferror type = "EXCEPTION" exception = "any" template = "error.cfm">
But then it just decided not to work, so I added these
<cferror type = "REQUEST" template = "error.cfm">
<cferror type = "VALIDATION" template = "error.cfm">
Is there a way to make sure that all errors are handled? Am I right in putting all 3 of these in the application.cfm or do I need more (or less?)
Thanks
Mark
Copy link to clipboard
Copied
Could you be more specific on "then if decided not to work"?
Copy link to clipboard
Copied
It just didn't react to the error, by going to error.cfm, it just threw out the usual CF error as if I had not added CFERROR
With those 3 statements in there is seems to work, but I wanted to make sure that no matter what error occurs it's going to hit the error.cfm