since toJson function, wrong available functions on error with unknown function

Description

now throws

The function [toList] does not exist in the Object, only the following functions are available: [toJson].

previously it threw

The function [toList] does not exist in the Object, only the following functions are available: [append,clear,copy,count,delete,duplicate,each,every,filter,find,findKey,findValue,insert,isEmpty,keyArray,keyExists,keyList,keyTranslate,len,map,reduce,some,sort,update]

Environment

None

Activity

Show:
Zac Spitzer
December 4, 2020, 9:55 PM
Edited

sometimes Lucee says object, other times Struct

or Array, it’s just not as immediately clear as it could be. I find always myself asking, what Object? it’s a cfc?

Michael Offner
December 4, 2020, 10:11 PM

improved the message, if we have the type we show it

 

so it shows now all functions, it has a space between them and we show the type.

Michael Offner
December 4, 2020, 10:16 PM

Zac Spitzer
December 4, 2020, 10:24 PM

but can you move the

Only the following functions are available: [append, clear, copy, count, delete, duplicate, each, every, filter, find, findKey, findValue, insert, isEmpty, keyArray, keyExists, keyList, keyTranslate, len, map, reduce, some, sort, toJson, update, valueArray].

to the exception detail? It’s more readable and doesn’t fill up the logs (which are all currently repeated )

Michael Offner
December 19, 2020, 2:20 AM

the message is done with help of ExceptionUtil.similarKeyMessage(…) what need to be changed to ExceptionUtil.similarKeyMessageAndDetail(…) what is used in many places. so if we do that split we should do it for all occurrences, but as part of a different ticket, could you raise a separate ticket for that?

Fixed

Assignee

Michael Offner

Reporter

Zac Spitzer

Priority

New

Labels

Fix versions

Affects versions