tracker issue : CF-3672861

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

Add a DISABLED (optional, default=false) argument to the CFSILENT and CFTRY tags.

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): M S / M S (_Michael___)

Created: 11/21/2013

Components: Language

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 0

My idea is to add an option to the <CFTRY> and <CFSILENT> tags to help in development.  By their nature, these tags mask real errors, which is good in production, but in development I'd sometimes rather things just fell over.  If there was an easy way to switch them all off without commenting them out I think that would be helpful.

My idea would be to add the optional boolean argument, "DISABLED", to these tags.  This would be set to FALSE or NO by default, but you would be able to be set to TRUE or YES in development as and when required, eg.

<cftry disabled="YES">
or
<cftry disabled="#application.disableCFTRY#">
or
<cfsilent disabled="#application.disableCFSILENT#">

When disabled the tag would simply be ignored by the parser, but the code within would run as normal.

As an optional argument, it would be backwards compatible with older code.

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

Watson Bug ID:	3672861

External Customer Info:
External Company:  
External Customer Name: _Michael___
External Customer Email:  
External Test Config: My Hardware and Environment details:CF10 / Windows

Attachments:

Comments:

It does not make sense. If you don't want it, comment it out or just remove it.
Comment by Rupesh K.
13920 | May 02, 2014 10:14:46 PM GMT
I don't think Rupesh "not understanding it" is grounds for closing the ticket. That's more grounds for Rupesh to ask for clarification.
Comment by External U.
13921 | August 24, 2015 07:28:08 AM GMT
... However I *do* understand what the OP is asking for, and I think it's a poor enhancement request. If they are getting into the situation where "these tags mask real errors" then they have simply implemented their application suboptimally. try/catch should never *mask* an error, it should handle it. And the handling would likely be the same on dev as it is on prod. And... well OK, I don't understand this bit... I don't see how <cfsilent> can "mask real errors". It doesn't mask errors at all, it simply suppresses standard output (read: not error output). CFML should not cater to subpar application design. If there are situation in which <cfsilent> is suppressing errors, this is a bug, and should be raised separately.
Comment by External U.
13922 | August 24, 2015 07:32:32 AM GMT