Quick Tip: What to do when your error handling isn't working?

Two quick things you should check when your error handling isn't working right.

  1. Make sure your error handler doesn't have a bug itself. A good example of this is an error handler that sends a report to application.adminEmail. If your error occurs in application startup, before application.adminEmail is set, then it is no surprise that your error handler would fail as well. Suggestion: Make your error handler as simple as possible. Just a "Something is wrong" text message. If that helps, then the error is in your error handler.

  2. ColdFusion's error handler won't handle syntax errors like so: <cfsearch collection="cfdocs" criteria="cfabort and name="res">. Notice that the criteria attribute doesn't properly end? Suggestion: Look at the error message. It may look something like this: Invalid token " found on line 2 at column 62. The invalid token is a hint. Also try just using your IDE. CFEclipse's synax checker isn't perfect, but many times it does flag a syntax error and I just don't notice it.

Archived Comments

Comment 1 by shag posted on 7/15/2008 at 11:11 PM

the great jedi master has syntax errors?!? gasp...

Comment 2 by Raymond Camden posted on 7/16/2008 at 2:14 AM

Many...