MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 305

Developing coldfusion mx applications
Table of Contents

Advertisement

Use the following procedure to test the code.
Testing the code:
Make sure there is no includeme.cfm file and display the page. The
1
type="MissingInclude"
Create a nonempty includeme.cfm file and display the page. If your database is configured
2
properly, you should see an employee entry and not get any error.
In the
tag, change the line:
3
cfquery
FROM Employee
to:
FROM Employer
Display the page. This time the
Change Employer back to Employee.
4
Change the
cfoutput
<p>Department: #Dept_ID#<br>
to:
<p>Department: #DepartmentID#<br>
Display the page. This time the
indicating an expression error.
Change DepartmentID back to Dept_ID and redisplay the page. The page displays properly.
5
Open \CFusion\Log\MyAppPage.log in your text editor. You should see a header line, an
initialization line, and four detail lines, similar to the following:
"Severity","ThreadID","Date","Time","Application","Message"
"Information","web-0","11/20/01","16:27:08",,"C:\Neo\servers\default\logs\
MyAppPage.log initialized"
"Information","web-0","11/20/01","16:27:08",,"Page: /neo/MYStuff/NeoDocs/
cftryexample.cfm Error: MissingInclude"
"Information","web-1","11/20/01","16:27:32",,"Page: /neo/MYStuff/NeoDocs/
cftryexample.cfm Error: "
"Information","web-0","11/20/01","16:27:49",,"Page: /neo/MYStuff/NeoDocs/
cftryexample.cfm Error: Database"
"Information","web-1","11/20/01","16:28:21",,"Page: /neo/MYStuff/NeoDocs/
cftryexample.cfm Error: General Exception"
"Information","web-0","11/20/01","16:28:49",,"Page: /neo/MYStuff/NeoDocs/
cftryexample.cfm Error: "
block displays the error.
cfcatch type="Database"
line:
cfcatch type="Any"
Handling runtime exceptions with ColdFusion tags
cfcatch
block displays an error message.
block displays an error message
305

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents