Created
May 18, 2026 18:52
-
-
Save trycf/5722d81a36e4c27d0c236c870821bdb4 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
| <cftry> | |
| <cfoutput>Outer try starts.<br></cfoutput> | |
| <cfset local.retval = {}> | |
| <cfset local.retval.status = ""> | |
| <Cfset local.retval.message = ""> | |
| <!--- Inner cftry block ---> | |
| <cftry> | |
| <cfoutput>Inner try starts.<br></cfoutput> | |
| <!--- This will cause an error ---> | |
| <cfset x = 10 / 0> | |
| <cfoutput>Inner try ends.<br></cfoutput> | |
| <cfcatch type="any"> | |
| <cfoutput>Inner catch: #cfcatch.message#<br></cfoutput> | |
| <!--- Uncomment the next line to propagate the error to outer cfcatch ---> | |
| <!--- <cfthrow> ---> | |
| </cfcatch> | |
| </cftry> | |
| <cfoutput>Outer try ends.<br></cfoutput> | |
| <cfcatch type="any"> | |
| <cfoutput>Outer catch: #cfcatch.message#<br></cfoutput> | |
| </cfcatch> | |
| </cftry> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment