dmr
dmr

Reputation: 22353

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

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 administrator in the event of an error. Which is better to use, a cferror tag or the onError method?

Upvotes: 0

Views: 417

Answers (1)

Henry
Henry

Reputation: 32905

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().

Upvotes: 6

Related Questions