CFSCRIPT incorrect error

Posted At : August 22, 2007 7:04 AM | Posted By : Dave
Related Categories: ColdFusion

Well, it took about 20 minutes of digging through code to find the code error. However, if the error message would have been accurate it would have taken about 5 seconds. In a cfc I was working on there are 5 functions in it. Each function contains a cfscript block. Some are a couple hundred lines each. CF was giving me this error:

The start tag must have a matching end tag. An explicit end tag can be provided by adding </CFSCRIPT>. If the body of the tag is empty, you can use the shortcut <CFSCRIPT .../>.

However, this error is inaccurate. The actual issue was that there was a missing ";" at the end of a line inside the cfscript. I checked the same code against CF7 and CF8 and the error message was the same.

So, the moral of the story is... I have no idea. But, keep an eye on your code and remember that the error reporting in CF can, at times, be wrong.

--Dave

Comments
That is an unfortunate reality about using cfscript. The error reporting can be severely off at times.
# Posted By JohnEric | 8/23/07 5:31 AM