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!
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
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!
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.
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,
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
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
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
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
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
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
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.
12 matches
Mail list logo