Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 397

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
• New: These are features newly added to ColdFusion 9. For example, if you use
in a CFM, analyzer informs that
as a user-defined function in a CFC, analyzer informs that throw is a built-in function and suggests you
throw
to prefix it with object scope. For more details on new features, see example,
page 5.
You can run the Code Analyzer from the ColdFusion Administrator. Select Code Analyzer from the list of Debugging
& Logging pages.
Note: The Code analyzer does not execute the pages that it checks. Therefore, it cannot detect invalid attribute
combinations if the attribute values are provided dynamically at runtime.
Troubleshooting common problems
A few common problems that you might encounter and ways to resolve them are described here.
For more information on troubleshooting ColdFusion, see the ColdFusion Support Center Testing and
Troubleshooting page at www.adobe.com/go/learn_cfu_troubleshoot_en. For common tuning and precautionary
measurements that can help you prevent technical problems and improve application performance, see the
ColdFusion tech tips article, TechNote number 13810. A link to the article is located near the top of the Testing and
Troubleshooting page.
CFML syntax errors
Problem: You get an error message such as the following:
Encountered "function or tag name" at line 12, column 1.
Encountered "\"" at line 37, column 20.
Encountered "," at line 24, column 61.
Unable to scan the character '\"' which follows "" at line 38, column 53.
These errors typically indicate that you have unbalanced <, ", or # characters. One of the most common coding errors
is to forget to close quoted code, number sign-delimited variable names, or opening tags. Make sure the code in the
identified line and previous lines do not have missing characters.
The line number in the error message often does not identify the line that causes the error. Instead, it identifies the
first line where the ColdFusion compiler encountered code that it could not handle as a result of the error.
Problem: You get an error message you do not understand.
Make sure all your CFML tags have matching end tags where appropriate. It is a common error to omit the end tag for
the
,
,
cfquery
cfoutput
cftable
As with the previous problem, the line number in the error message often does not identify the line that causes the
error, but the first line where the ColdFusion compiler encounters code that it could not handle as a result of the error.
Whenever you have an error message that does not appear to report a line with an error, check the code that precedes
it for missing text.
Problem: Invalid attribute or value.
If you use an invalid attribute or attribute values, ColdFusion returns an error message. To prevent such syntax errors,
use the CFML Code Analyzer. Also see
Problem: You suspect that there are problems with the structure or contents of a complex data variable, such as a
structure, array, query object, or WDDX-encoded variable.
Use the
tag to generate a table-formatted display of the variable's structure and contents. For example, to dump
cfdump
a structure named
relatives
is a built-in ColdFusion function and suggests you to rename. If you use
throw
, or
tag.
cfif
"Using the cftrace tag to trace
, use the following line. Surround the variable name with number signs (#).
Last updated 1/20/2012
as a user-defined function
throw
"What's new in ColdFusion
execution" on page 385.
392
9" on

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents