...
Flagging Code As Deprecated
Inline Code
As a core developer you can flag deprecated code by including this following snippet:
Code Block | ||
---|---|---|
| ||
<!--- @@deprecated: ../admin/navajo/edit.cfm should be replaced by call to ../conjuror/invocation.cfm ---> <cfimport taglib="/farcry/core/tags/farcry" prefix="farcry" /> <farcry:deprecated msg="../admin/navajo/edit.cfm should be replaced by call to ../conjuror/invocation.cfm" /> |
The log message should specify what deprecated feature is being used and the alternative feature/function that should be used in its stead.
Innards
Code Block | ||
---|---|---|
| ||
<cfif structkeyExists(application.log, "bDeprecated") AND application.log.bDeprecated> <cfset deprecatedMsg="../admin/navajo/edit.cfm should be replaced by call to ../conjuror/invocation.cfm" /> <cftrace type="warning" inline="false" text="#deprecatedMsg#" abort="false" /> <cflog file="deprecated" application="true" type="warning" text="#deprecatedMsg#" /> </cfif> |
...