Adobe COLDFUSION 9 Manual page 282

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Type
Exception
Missing template
Form field data validation
Note: The onSubmit and onBlur form field validation techniques use JavaScript or Flash validation on the client browser.
About ColdFusion exceptions
Most ColdFusion errors are exceptions. You can categorize ColdFusion exceptions in two ways:
• When they occur
• Their type
When exceptions occur
ColdFusion errors can occur at two times, when the CFML is compiled into Java and when the resulting Java executes,
called runtime exceptions.
Compiler exceptions
Compiler exceptions are programming errors that ColdFusion identifies when it compiles CFML into Java. Because
compiler exceptions occur before the ColdFusion page is converted to executable code, you cannot handle them on
the page that causes them. However, other pages can handle these errors. For more information, see
compiler
exceptions" on page 282.
Runtime exception
A runtime exception occurs when the compiled ColdFusion Java code runs. It is an event that disrupts the normal flow
of instructions in the application. Exceptions can result from system errors or program logic errors. Runtime
exceptions include:
• Error responses from external services, such as an ODBC driver or CORBA server
• CFML errors or the results of
• Internal errors in ColdFusion
Description
An error that prevents normal processing from continuing. All ColdFusion exceptions are, at their
root, Java exceptions.
An HTTP request for a ColdFusion page that cannot be found. Generated if a browser requests a
ColdFusion page that does not exist.
Missing template errors are different from missing include exceptions, which result from
cfinclude
tags or custom tag calls that cannot find their targets.
Server-side form field validation errors are a special kind of ColdFusion exception. You specify server-
side form validation by using
cfform
side validation, such as the cfparam tag generate runtime exceptions. For more information on
validating form fields see
"Validating
ColdFusion includes a built-in error page for server-side form field validation errors, and the cferror
tag includes a
type
attribute that lets you handle these errors in a custom error page, but if you use
onError processing in Application.cfc, or try/catch error handling, the error appears as an Application
exception. For more information on handling Form field validation in Application.cfc see
server-side validation errors in the onError
or
tags
cfthrow
cfabort
Last updated 8/5/2010
attributes or hidden HTML form fields. All other types of server-
Data" on page 743.
method" on page 248.
277
"Handling
"Handling

Advertisement

Table of Contents
loading

Table of Contents