Rob Gonda's Blog

ajaxCFC error trapping

I just added a small but extremely useful tool to ajaxCFC: error trapping. When working with ajax applications something it’s hard to debug server side errors; of course, all the information travels asynchronously and if the server errors out, your call back function never gets triggered… well, you know there’s a problem, but what is it?

I had two methods of debugging:
1) check the server logs…
2) open an http header packet sniffer, check the method being calls, and emulate a direct call to get the output.

Therefore, I decided to add an error trapping to the server side and send the error back to the browser in an alert box. Now if you break anything in the server side you will immediately see the error message. Unfortunately, cfcatch doesn’t provide some useful information that cferror does, but it’s definitely extremely helpful.

If you have any more suggestions to make this framework as handy and useful as possible to the CF community, please do not hesitate to post a comment or email me directly.

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?12228EB6-3048-7431-E4E0E358D01F4F32

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
This blog is running version 5.9.003. Contact Blog Owner