Title:
Exceptions raised from member functions gets wrapped in Application exception
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): / ()
Created: 05/19/2017
Components: Language, Member Functions
Versions: 2016,11.0,2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: CF 11 HF 11, CF 2016 / 2018,0,02,312829
Priority/Frequency: Normal / Most users will encounter
Locale/System: /
Vote Count: 2
Problem:
Exception raised from member function gets wrapped in Application exceptions.
This is not seen in case of built-in functions.
Repro: http://blog.adamcameron.me/2015/07/cfml-coldfusion-does-some-dodgy.html
Related Bug - CF-4021994
Method:
{code:java}
<cfscript>
thingArray = [[1,2,3],[4,5,6],[7,8,9]];
thingArray.each(function(item){
item.each(function(subItem)
{ writedump(f); });
});
</cfscript>
<cfscript>
thingArray = [[1,2,3],[4,5,6],[7,8,9]];
arrayeach(thingArray,function(item){
arrayeach(item,function(subItem) { writedump(f); }
);
});
</cfscript>
{code}
Result:
The first code snippet throws a vanilla exception.
The second snippet throws the expected exception, "Variable F is undefined.".
Expected:
Exceptions must not be nested within an Application exception.
Workaround:
Note:
Attachments:
Comments: