tracker issue : CF-3043932

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 87009:[ANeff] Bug for: Incorrect errors for duplicate "case" valuesPlease consider this example:<cfscript> switch("a") { case "b": {break;} case "b": {break;} }</cfscript>This is the error message:-

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 08/03/2011

Components: Language, Exception Handling

Versions: 9.0.1

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 280787

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 0

Problem:

[ANeff] Bug for: Incorrect errors for duplicate "case" valuesPlease consider this example:<cfscript>  switch("a") {    case "b": {break;}    case "b": {break;}  }</cfscript>This is the error message:-----------Context validation error for the cfcase tag.  The cfswitch tag has a duplicate cfcase tag for value B.    ColdFusion cannot determine the line of the template that caused this error. This is often caused by an error in the exception handling subsystem.  -----------Bug 1: This code is "case" within "switch" (script), but the error is for <cfcase> within <cfswitch> (tag).Bug 2: CF can't determine the line number?
Method:


Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3043932

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email: 3D1D17B03C844EBF992001AC
External Test Config: 08/03/2011

Attachments:

Comments:

Verified this is fixed in CF Final (build 10,282462). Just a note: The error message uppercases the value. Ex: <cfscript> switch("a") { case "b": {break;} case "b": {break;} }</cfscript> That throws message: "switch has a duplicate case for value B." Note that the value was 'b', not 'B'. The cfswitch tag does the same (uppercases the value in the error message). But this is minor, so not filing another bug just for that :) Thanks!, -Aaron
Comment by External U.
21030 | May 26, 2012 11:19:09 PM GMT