Created
March 25, 2014 00:28
-
-
Save bennadel/9752428 to your computer and use it in GitHub Desktop.
Dealing With RequestTimeOut And The OnError Application Event Method (Help Me)
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
<cfcomponent> | |
<!--- Set up global page processing. ---> | |
<cfsetting | |
requesttimeout="5" | |
showdebugoutput="false" | |
/> | |
<cffunction | |
name="OnError" | |
access="public" | |
returntype="void" | |
output="true"> | |
<p> | |
You have errored out. | |
</p> | |
<p> | |
Error: #ARGUMENTS[ 1 ].Message# | |
</p> | |
</cffunction> | |
</cfcomponent> |
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
<!--- | |
Set up a bunch of CFHttp calls to force the page to | |
run longer than the set request time out. | |
---> | |
<cfhttp url="http://www.google.com?q=#Rand()#" /> | |
<cfhttp url="http://www.yahoo.com?q=#Rand()#" /> | |
<cfhttp url="http://www.cnn.com?q=#Rand()#" /> | |
<cfhttp url="http://www.searchgalleries.com?q=#Rand()#" /> | |
<cfhttp url="http://www.espn.com?q=#Rand()#" /> | |
<cfhttp url="http://www.houseoffusion.com?q=#Rand()#" /> | |
<cfhttp url="http://www.fullasagoog.com?q=#Rand()#" /> | |
<cfhttp url="http://www.ask.com?q=#Rand()#" /> | |
<cfhttp url="http://www.cnet.com?q=#Rand()#" /> | |
<!--- Success! ---> | |
Done grabbing content. |
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
<cffunction | |
name="OnError" | |
access="public" | |
returntype="void" | |
output="true"> | |
<p> | |
You have errored out. | |
</p> | |
<p> | |
Error: #ARGUMENTS[ 1 ].Message# | |
</p> | |
<!--- Dump out the error arguments. ---> | |
<cfdump | |
var="#ARGUMENTS[ 1 ]#" | |
top="1" | |
/> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment