tracker issue : CF-4202602

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

[ANeff] Bug for: REST method compile time error says wrong file

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

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

Created: 05/24/2018

Components: REST Services

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.01.308605 (PreRelease) / 309878

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 0

Issue: REST method compile time error says wrong file

Steps to Reproduce:
1) unzip attached app
2) In CF Admin, create "mymapping" mapping to unzipped app's directory
3) run index.cfm to register REST app
4) run mypage.cfm

Actual Result:
-----------
The error occurred in {path}/MyCFC.cfc: line 4

2 : component rest=true restpath="a" {
3 :   remote string function returnVoid(string c restargsource="path") httpmethod="GET" restpath="b/{c}" produces="application/json" {
4 :     o = new mymapping.myOtherCFC();
5 :     return serializeJSON(ARGUMENTS.c == 'c' ? 'c' : '');
6 :   }
-----------

Expected Result:
-----------
The error occurred in {path}/MyOtherCFC.cfc: line 2

1 : component {
2 :   function f() {compileTime=}
3 : }
-----------

Note: If `function f() {compileTime=}` is changed to `compileTime` in MyOtherCFC.cfc, then error shows correct file:
-----------
The error occurred in {path}/MyOtherCFC.cfc: line 2

1 : component {
2 :   compileTime
3 : }

-----------

Note: If `o = new mymapping.myOtherCFC()` is called from a .cfm (i.e. not during REST call), then error also shows correct file.

Summary: The issue seems to only occur when a CFC *method* throws a compile time error during a *REST call*.

Attachments:

Comments:

This is fixed in buildĀ 309878
Comment by Nitin K.
28952 | May 30, 2018 11:08:57 AM GMT