I've never gotten this to work on CFMX (6.0 or 6.1), even though the docs
indicate it's possible.  Instead, I use a single CFERROR tag whose template
is nothing more than a CFSWITCH on #error.rootcause.type#.  Each CFCASE
includes includes one or more templates to deal with the error.

I like the approach, because everything passes through that single template,
so doing repeated tasks is easier.

Cheers,
barneyb

> -----Original Message-----
> From: Willy Ray [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 12:10 PM
> To: CF-Talk
> Subject: multiple cferror type=exception tags
>
> Hey, I'm trying to have custom error types, but I'm having
> some trouble.
>  I have in my Application.cfm file the following code.
>
> <cferror type="exception" template="error_templates/error.cfm"
> exception="db_error">
> <cferror type="exception" template="error_templates/custom.cfm"
> exception="my_custom_error">
>
> The problem is, even if I
>
> <cfthrow type="db_error" ... >
>
> I get the error_templates/custom.cfm file as the error handler.  If I
> switch the order of the two lines in the Application.cfm
> file, I get the
> *other* error handling template regardless of what kind of exception I
> throw.  
>
> I had thought that cold fusion allowed multiple developer-designated
> error types... What am I doing wrong?
>
> Willy
>
>
>
> -----
> Willy Ray
> Web Applications Developer
> Certified Advanced ColdFusion Developer
> Westminster College
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to