Re: cferror and exceptions

2000-10-20 Thread Steve Nelson

I think I have had that problem 

i place a  in my application.cfm files and
have it email me on EVERY error that is not caught by a cfcatch
although I have noticed that for whatever reason there are a couple
errors that seem to get past.  The one that I noticed was when my DSL
connection goes down and my ODBC conneciton to the database cannot be
made and the cfapplication tag blows up.

Is this kind of what you're talking about?

Steve

Lawrence Smith wrote:
> 
> Hi All
> 
> We are trying to utilise one of the new CF4.5 features where you can catch
> exceptions using cferror instead of using cftry and cfcatch.
> 
> However, our host is on 4.5 and it is not working - anyone else had this
> experience of know of a bug/solution?
> 
> Many thanks!
> Lawrence Smith
> 
> 
>
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
>with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: cferror and exceptions

2000-10-20 Thread Dave Watts

> We are trying to utilise one of the new CF4.5 features where 
> you can catch exceptions using cferror instead of using cftry 
> and cfcatch.
> 
> However, our host is on 4.5 and it is not working - anyone 
> else had this experience of know of a bug/solution?

You'll have to be more specific, I think. What exactly isn't working? Can
you show code?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: cferror and exceptions

2000-10-20 Thread Dave Watts

> > We are trying to utilise one of the new CF4.5 features where 
> > you can catch exceptions using cferror instead of using cftry 
> > and cfcatch.
> > 
> > However, our host is on 4.5 and it is not working - anyone 
> > else had this experience of know of a bug/solution?
...
> what is the content of the templates that you are calling, in 
> the event of cferror?  
> 
> Only minimal cfcode is allowed, basically Whichever 
> error variables your exception creates. You can also 
> do whatever standard html you want. (I suspect this is so you 
> won't create an exception and start an infinite loop)

There are a couple of errors here, which should be pointed out.

When you use exception handling, you can specify whatever CFML code you want
within the CFCATCH block(s) of your exception handler. An exception in CF
isn't exactly the same thing as an error - think of it as a potential error,
or an "error-in-waiting".

If an exception isn't handled, it will become an error. CF will stop the
processing of the request, and log the error.

If you use the CFERROR tag with the TYPE attribute set to "REQUEST" to
redirect the error to a specific page, that page may only reference the
error variables, and can't have any CFML tags or functions within it - not
even the CFOUTPUT mentioned above.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: cferror and exceptions

2000-10-20 Thread Jones, Matt

what is the content of the templates that you are calling, in the event of
cferror?  

Only minimal cfcode is allowed, basically Whichever error
variables your exception creates.  You can also do whatever
standard html you want.  (I suspect this is so you won't create an exception
and start an infinite loop) 

To do other processing on it, you would need to hit another page.  I
accomplish this by creating a form on the template page. with all of the
error scoped variables being the values of my hidden form fields, display
some type of "happy" error message, and the body tag has an
onLoad="setTimeout('document.forms[0].submit();',6000)" to send it to
another page after enough time to read the page.  This next page can do any
cfm processing.

-Original Message-
From: Lawrence Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 20, 2000 1:01 AM
To: CF-Talk
Subject: cferror and exceptions


Hi All

We are trying to utilise one of the new CF4.5 features where you can catch 
exceptions using cferror instead of using cftry and cfcatch.

However, our host is on 4.5 and it is not working - anyone else had this 
experience of know of a bug/solution?

Many thanks!
Lawrence Smith





Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]