开发者

What are the pros/cons of using a cferror tag vs. the onError method to handle errors?

开发者 https://www.devze.com 2022-12-20 18:31 出处:网络
I would like to set up an error page which will diplay a message to the user, have the error logged, and have an automatic email sent out to the website administ开发者_JAVA技巧rator in the event of an

I would like to set up an error page which will diplay a message to the user, have the error logged, and have an automatic email sent out to the website administ开发者_JAVA技巧rator in the event of an error. Which is better to use, a cferror tag or the onError method?


Application.cfm uses <cferror>, Application.cfc uses onError().

Application.cfc is the preferred method for current version of CF because it can do things that Application.cfm cannot. Therefore, one should use onError().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号