On 8/19/05, Rebecca Wells <[EMAIL PROTECTED]> wrote:
>
> Ah hah! So how do you set a filter for it?
>
You have to build 'knowledge' of errors you want to ignore into your error
handler.
Here's how I do it inside of ContentMonger Pro:
First, I create a list of errors I want to ignore in a text file. One error
per line of the text file. This is a pretty short list by default, having
only one item:
java.net.SocketException: Connection reset by peer: socket write error
But I or whoever is admin'ing the software can add more items to the text
file as they please. Next, when an error occurs the error handler reads in
this ignore file:
<cffile
action="read"
file="#request.myPath#/ignore_these_errors.txt"
variable="errList">
And feeds the list of errors into an array, where the delimiter for the
list is the cr/lf at the end of each text line.
<cfset errArray=ArrayNew(1)>
<cfset errArray=ListToArray(errList,"#chr(13)##chr(10)#")>
then it loops over the array to see if the current error -- assuming an
error message was returned -- is to be ignored
<cfif isdefined ("error.message")>
<cfloop
from="1"
to="#ArrayLen(errArray)#"
index="ArrayElement">
<cfif FindNoCase(errArray[ArrayElement],error.message,1)>
<cfset variables.neverMind="Y">
</cfif>
</cfloop>
</cfif>
if variables.neverMind (which was cfparam'd to "N" at the top of the error
handler) is "Y" then error processing branches to something that shows a
friendly screen message but doesn't fill up my inbox, the error database or
the folder where errors are saved to .html files for secure retrieval.
Exactly what depends on what type of handling the admin selected in the
system settings.
I also do exactly the same thing -- and run a separate set of tests -- for
bots I don't like.
You only want to do this sort of thing when you KNOW you don't want to be
bothered as this will put such errors -- or errors generated by certain bots
-- more or less permanently under your radar.
HtH,
--
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com <http://mysecretbase.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215861
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54