| | |
Catching Attribute Validation Errors
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2007
Posts: 29
Reputation:
Solved Threads: 0
Hi,
I have a cferror type = "exception" exception="any" in my application.cfm file. This works great for most errors, but I recently found that it is not working for attribute validation errors.
For example, if I misspell an attribute for the cfqueryparam tag, my custom error page is not called. Instead, I get the default error that shows the SQL in my query, which I don't want. Cftry/cfcatch didn't work, either.
I can't use the Site-wide Error Handler, because I'm on a hosted server and I'm not allowed to make any changes to the Coldfusion Administrator.
Any ideas?
Thank you.
I have a cferror type = "exception" exception="any" in my application.cfm file. This works great for most errors, but I recently found that it is not working for attribute validation errors.
For example, if I misspell an attribute for the cfqueryparam tag, my custom error page is not called. Instead, I get the default error that shows the SQL in my query, which I don't want. Cftry/cfcatch didn't work, either.
I can't use the Site-wide Error Handler, because I'm on a hosted server and I'm not allowed to make any changes to the Coldfusion Administrator.
Any ideas?
Thank you.
•
•
Join Date: Jan 2008
Posts: 35
Reputation:
Solved Threads: 5
•
•
•
•
Instead, I get the default error that shows the SQL in my query, which I don't want. Cftry/cfcatch didn't work, either.
•
•
•
•
This works great for most errors, but I recently found that it is not working for attribute validation errors.
~ mellamokb
•
•
Join Date: Jan 2008
Posts: 35
Reputation:
Solved Threads: 5
More information can be found at:
http://livedocs.adobe.com/coldfusion...e=00000242.htm
~ mellamokb
http://livedocs.adobe.com/coldfusion...e=00000242.htm
•
•
•
•
DracTK said on Apr 12, 2007 at 9:11 AM :
What thekat is saying is that the CF template has to be compilable in order for errors that cferror can catch to occur. cferror is only for run time errors, doesn't work for compile time errors (which makes a lot of sense).
Runrocket said on Jul 9, 2007 at 8:12 AM :
What is interesting is that while CFERROR will not catch compile time errors like '<cfet x = 1 />', if you define a site wide error handler in CF Administrator, this error will get caught and the user will be redirected to your custom error template. The problem here is that this error template cannot be customized for a specific application, but will appear for all applications hosted on your stand alone server or JRun instance.
•
•
Join Date: Apr 2007
Posts: 29
Reputation:
Solved Threads: 0
Thank you, mellamokb. That was helpful. I just wanted to make sure I was doing everything possible. I do always check before I publish a page, but I've inherited this site, and there are a lot of pages that I haven't worked on.
Thanks again!
-- Lafalot
Thanks again!
-- Lafalot
Last edited by lafalot; Jan 5th, 2008 at 2:58 am.
![]() |
Other Threads in the ColdFusion Forum
- Previous Thread: C# or C++ with coldfusion web service
- Next Thread: report builder
| Thread Tools | Search this Thread |





