Ben Forta

Blog

March 2, 2002

Structure Member Insertion

There are two basic ways to insert members into ColdFusion structures - the StructInsert() function, or . The latter will always overwrite members if a member with the same name exists, the former takes an optional AllowOverwrite parameter (which defaults to TRUE) allowing you to specify whether or...

March 1, 2002

Specify Date Parts Correctly

DatePart() is used to extract specific parts of date values (the year, the hour, the weekday, and so on). Parts are specified using special identifiers (YYYY for year, H for hour, and W for weekday, and so on). These parts must be passed as strings (within quotes) or ColdFusion will not process the...

February 28, 2002

Trapping Specific Database Errors

Using / handling it is possible to trap specific database errors, possibly even allowing you to run code to fix problems when they occur. To trap specific database errors create a block with TYPE="database" and inspect the CFCATCH.NativeErrorCode variable. (Applies to: ColdFusion 5)

February 27, 2002

Viewing the Tag Stack

When viewing debug output generated by pages that use / based exception handling, it is often valuable to see the entire tag stack. To use this feature the "Enable CFML Stack Trace" option must be checked in the ColdFusion Administrator. (Applies to: ColdFusion 4 or later)

February 26, 2002

When Includes Go Missing

is a very important and useful tag, and is a fundamental element of code reuse in ColdFusion. That is, until a file is moved or renamed or deleted - and then all calls fail. This is a real problem, because there is no ease way to determine where files are being included. The solution is to use / to...

February 25, 2002

Using Custom Exception Types

ColdFusion exception handling allows developers to trap and respond to specific error conditions, including custom ones (ones defined by the developer). Custom types are named using dot notation, allowing developers to create types, subtypes, and so on. code can catch specific subtypes if needed....

February 24, 2002

Don't Throw Without Catching

The tag forms the basis of ColdFusion exception handling, passing control to tags when error conditions occur. Every must have at least one in it, or ColdFusion will throw an error. (Applies to: ColdFusion 4 or later)

February 23, 2002

Throwing Application Exceptions

Using try / catch handling (with and ) within your application? That same code can also be used to handle application specific exceptions - exceptions that you can create yourself. To throw your own exceptions, use the tag and catch TYPE="application". (Applies to: ColdFusion 5)

February 22, 2002

Handling Specific Error Conditions

In addition to the standard exception handling supported by the types, ColdFusion also supports over 50 advanced types. Use these to catch and handle very specific exceptions (for example, login failure). (Applies to: ColdFusion 5)

February 21, 2002

Programmatic Query Column Population

ColdFusion queries are usually created by tags like , , and . But queries can also be created (and added to) programmatically using the query functions, and columns may be added to a query using the QueryAddColumn() function. In addition, to populate query columns an optional array may be passed to...

Page 436 of 489 (4885 posts)