CFWheels removing context from errors

54 views
Skip to first unread message

Adam Cameron

unread,
Aug 11, 2021, 5:06:17 AM8/11/21
to CFWheels
Hi
I asked this in the CFML Slack channel, but didn't get any feedback. Replicating here.

Anyone know why this logic (in /wheels/events/onerror/cfmlerror.cfm) is there:

<cfif local.template Does Not Contain "wheels" AND FindOneOf("/\", local.template) IS NOT 0>
    Line #local.tagContext[local.pos].line# in #local.template#<br>
</cfif>

Why would CFWheels actively remove lines from the error context? It's not like errors don't occur in Wheels's code, or Wheels's code doesn't contribute to an erroring situation. What is being gained by taking that information out?

A real world case in point here. I just got this alert:

Error: key [COLUMN] doesn't exist
Location: Line 123 in /path/to/file/in/our/app

That error came from CFWheels's `wheels/model/adapters/Base.cfc` file, a fact Wheels has unhelpfully stripped from the error reporting.

However for someone who doesn't know the mungling being done, they're gonna be looking for a stray reference to COLUMN in their code @ line 123.

Also... what if my filename / path actually has "wheels" in it?

This feature seems "unhelpful" to me on first blush, but I might be missing something?

Tom King

unread,
Aug 11, 2021, 5:36:30 AM8/11/21
to CFWheels
I suspect this was some historical decision about trying to keep the wheels specific error output "clean", but I agree, there's no real reason to hide additional data.
T

Adam Cameron

unread,
Aug 11, 2021, 11:48:01 AM8/11/21
to CFWheels
Worth me raising a ticket at least, to get that logic removed?

Adam Cameron

unread,
Aug 16, 2021, 4:56:45 AM8/16/21
to CFWheels
Reply all
Reply to author
Forward
0 new messages