Title:
Bug 73874:When running functions in scripted cfcs that are missing semicolons, a ScriptParseExceptions$MissingKeywordException is thrown with the message "function keyword is missing in function declaration
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / bill shelton (virtix)
Created: 12/01/2008
Components: Language, CFSCRIPT
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,216113 /
Priority/Frequency: Normal / Most users will encounter
Locale/System: English / Linux Red Hat All
Vote Count: 1
Problem:
When running functions in scripted cfcs that are missing semicolons, a ScriptParseExceptions$MissingKeywordException is thrown with the message "function keyword is missing in function declaration. ". I expect something along the lines of either a MissingSemicolonException or a more general parser exception.
This happens for a function in cfscript in general.
Method:
execute the following (note missing semicolon after string literal "foo"):
component {
function foo() {
local.msg = "foo"
return msg;
}
}
Result:
coldfusion.compiler.ScriptParseExceptions$MissingKeywordException: function keyword is missing in function declaration. at coldfusion.compiler.ScriptParseExceptions.throwMissingKeywordException(ScriptParseExceptions.java:83) at coldfusion.compiler.cfml40.functionDefinition(cfml40.java:2748) at coldfusion.compiler.cfml40.cfscriptStatement(cfml40.java:1498) at coldfusion.compiler.cfml40.functionDefinition(cfml40.java:2797) at coldfusion.compiler.cfml40.cfscriptStatement(cfml40.java:1498) at coldfusion.compiler.cfml40.start(cfml40.java:4286) at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:566) at ...
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3036902
External Customer Info:
External Company:
External Customer Name: bill shelton
External Customer Email: 259D3B324929474C992015A8
External Test Config: 12/01/2008
Attachments:
Comments: