• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 31. Event Gateways > Debugging CFML Applications for Event Gateways

Debugging CFML Applications for Event Gateways

When you need to develop ColdFusion applications that use event gateways, you need to be particularly careful—CFCs that are responding to events work differently than when they are responding to a normal page request. If an event gateway triggers a CFC and that CFC throws an error, the event gateway continues to function without pause and does not display any sort of debugging information back to you. For this reason, you'll need to follow some different development paradigms—especially with regard to debugging, so that you can make sure your CFCs and event gateways are functioning as expected. In this section we'll examine some techniques you can and should use to help you debug and write better code.

The first technique is to make extensive use of CFTRY, CFCATCH, and CFLOG. Keep in mind that CFCs called by the event gateway will fail, but the event gateway will continue processing requests without returning anything to you. Catching any exceptions in your CFML and dumping them to a specific file will allow you to much more easily debug your applications.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint