Catching Invalid CFML construct found in OnError

2010-10-20 Thread Tony Bentley
I am trying to catch this error type but it is not passing through onError in the Application Class. It simply is evaluated and thrown as is. How do I catch it without a try/catch? ~| Order the Adobe Coldfusion Anthology now!

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Claude Schnéegans
I am trying to catch this error type but it is not passing through onError in the Application Class. It simply is evaluated and thrown as is. How do I catch it without a try/catch? I don't think you can. onError will only catch execution errors. Invalid CFML construct is a compilation

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Tony Bentley
So basically if there is a typo in the syntax and the code does not compile it will throw an error and I cannot catch it? Hmmm... I guess I need to figure out something else. ~| Order the Adobe Coldfusion Anthology now!

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Claude Schnéegans
So basically if there is a typo in the syntax and the code does not compile it will throw an error and I cannot catch it? More precisely: if there is a typo, the code does get compiled, but is not executed. Since it is not executed, you cannot catch it at execution.

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Russ Michaels
you can probably catch it using the default error template. On Wed, Oct 20, 2010 at 9:30 PM, wrote: So basically if there is a typo in the syntax and the code does not compile it will throw an error and I cannot catch it? More precisely: if there is a typo, the code does get compiled,

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Dave Watts
More precisely: if there is a typo, the code does get compiled, but is not executed. Since it is not executed, you cannot catch it at execution. Well, not exactly - if there is a typo in CFML syntax (rather than within attribute values, etc), the code will not be compiled at all. CF will

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Dave Watts
So basically if there is a typo in the syntax and the code does not compile it will throw an error and I cannot catch it?  Hmmm... I guess I need to figure out something else. The site-wide error handler will catch compile-time errors. But really, you should catch them yourself - if you get

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Tony Bentley
Dave, You are correct but stuff slips through the cracks. It's how well you can track back the error to the source when it occurs that will dictate if the code will be fixed when or if it happens. I can show a pretty nice user friendly error, but the question remains the same. How will I track

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Dave Watts
You are correct but stuff slips through the cracks. It's how well you can track back the error to the source when it occurs that will dictate if the code will be fixed when or if it happens. I can show a pretty nice user friendly error, but the question remains the same. How will I track

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Tony Bentley
How do you catch compile time errors when they occur? Regardless if a template was tested or not. I understand best practices and that your code should be tested but it doesn't mean it will never happen. So when it does, how do you deal with it? If I get a server error from my applications, I get

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Dave Watts
How do you catch compile time errors when they occur? Regardless if a template was tested or not. I understand best practices and that your code should be tested but it doesn't mean it will never happen. So when it does, how do you deal with it? If I get a server error from my applications, I

Re: Catching Invalid CFML construct found in OnError

2010-10-20 Thread Tony Bentley
Okay so running the code is gonna have to be the answer. The original reason for asking was because in my Ajax app I was not able to pass a custom header if I got a compile time error so catching it was a bit more difficult. It makes sense on a page request but an ajax request could be messy.