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

Chapter 14.  Handling Errors and Exce... >  Error- and Exception-Handling Laye...

Error- and Exception-Handling Layers

ColdFusion provides different layers to handle errors. When an error occurs within the ColdFusion template, the first layer is invoked through the <cftry>,<cfcatch>, <cfthrow>, and <cfrethrow> tags. If this layer fails, a second layer is activated using the <cferror> tag. If this fails too, the ColdFusion Administrator sitewide handler activates the third layer. If no sitewide handler has been defined, the default error message is displayed. You can prevent an error that occurs during a <cfquery> or <cfstoredproc> database operation by using the <cftransaction> tag protection layer.

The Standard Error Format and Error Variables

If no error-handling layer is present, the standard error message is displayed in the browser. Figure 14.1 displays the standard error format.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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