Created
November 26, 2025 15:27
-
-
Save trycf/d6029521c31c76b54162a70986d797fb to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset variables.message = "Error 1" | |
| <cfset variables.ignoreErrors = [ | |
| ["Invalid terminal"] | |
| ]> | |
| <cfset variables.containsIgnoredError = variables.ignoreErrors.some(function(strings){ | |
| return strings.every(function(str) { | |
| return findNoCase(str, variables.message) > 0; | |
| }); | |
| })> | |
| <cfif variables.containsIgnoredError > | |
| <cfset request.applicationSettings.logging.logMsg(type="INFO", module="Error.cfm", text="Error is in ignore list - skipping email sending" ) /> | |
| <cfset variables.doSend = false /> | |
| <cfelse> | |
| <cfset request.applicationSettings.logging.logMsg(type="INFO", module="Error.cfm", text="Error is not in ignore list - sending email" ) /> | |
| </cfif> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment