maybe my understanding is a bit off, but the first error (x=y), happens at
run time.  it's syntax is fine, so the p-code compiles successfully.  only
when the line is executed is an error generated, as y doesn't exist.

in the second error, there is a syntax error, which is caught before the
p-code is compiled.  it's not a runtime error, so the exception handling
doesn't even come into it.



Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                                     
                    "Aidan Whitehall"                                                  
                                     
                    <AidanWhitehall@Fairba        To:     
<[EMAIL PROTECTED]>                                     
                    nks.co.uk>                    cc:                                  
                                     
                                                  Subject:     RE: [ cf-dev ] Error 
handling in CFMX                        
                    09/25/02 04:15 PM                                                  
                                     
                    Please respond to dev                                              
                                     
                                                                                       
                                     
                                                                                       
                                     



> are you asking why
>
> <cfset x = y> or
> <cfoutput>#Date#</cfoutput>
>
> fail?

No; apologies if it wasn't clear. With this in Application.cfm:

<cferror type="EXCEPTION" exception="ANY"
template="/errors/exception.cfm">
<cferror type="REQUEST" template="/errors/request.cfm">

and just this line in a template

<cfset x = y>

when y isn't defined, "errors/exception.cfm" is displayed (as you'd
hope). However, putting just this line of code

<cfset x = CreateDate(Date)>

when Date isn't defined, displays a standard-looking ColdFusion error
page saying "Parameter validation error for function CREATEDATE", and
not "errors/exception.cfm". Anyone know why?

And is there a way of using cftry/cfcatch/cfthrow to get it to display
"errors/exception.cfm" with an appropriate error message? (I was looking
at cfthrow details="" message="" earlier and wondered how they were
used)

I've only dabbled with exception handling before and really need to get
a better grasp of how it works. Thanks


--
Aidan Whitehall <[EMAIL PROTECTED]>
Macromedia ColdFusion Developer
Fairbanks Environmental +44 (0)1695 51775

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to