Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/b8731d0f30926b78b6f32725e52dbaed to your computer and use it in GitHub Desktop.
Save trycf/b8731d0f30926b78b6f32725e52dbaed to your computer and use it in GitHub Desktop.
TryCF Gist
<cfloop list="true,false" item="dumpEnabled">
<cftimer label="invalid host, throwOnError=false, dump=#dumpEnabled#" type="outline">
<cfhttp url="http://missing.luce1e.org" result="r"></cfhttp>
<cfdump var=#r# enabled=#dumpEnabled#>
</cftimer>
<cftimer label="404, throwOnError=false, dump=#dumpEnabled#" type="outline">
<cfhttp url="http://missing.lucee.org"></cfhttp>
<cfdump var=#cfhttp# enabled=#dumpEnabled#>
</cftimer>
<cftimer label="invalid host, throwOnError=true, dump=#dumpEnabled#" type="outline">
<cftry>
<cfhttp url="http://missing.luce1e.org" result="result" throwonerror="true"></cfhttp>
<cfcatch>
<cfdump var=#result# enabled=#dumpEnabled#>
</cfcatch>
</cftry>
</cftimer>
<cftimer label="404, throwOnError=true, dump=#dumpEnabled#" type="outline">
<cftry>
<cfhttp url="http://missing.lucee.org" throwonerror="true"></cfhttp>
<cfcatch>
<cfdump var=#cfhttp# enabled=#dumpEnabled#>
</cfcatch>
</cftry>
</cftimer>
</cfloop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment