This is not really CF related, but since this list is mainly read by Web 
developers, I thought it could be interesting  anyway.

First, let me say that my system logs CF executions error in a database with 
many details that help a lot to clean my code.
However it does not trap Javascript errors on client side, and with so many 
types of browsers, in many versions and each one with parameters that the user 
can de-activate without even knowing what the parameter is intended to, the 
developper can never be sure his code will run correctly in any circumstance.

Now, thanks to window.onerror, I just developped a Javascript error tracker 
able to ajax some information to my server, including the url where the error 
occured, the line number, stack, etc. and there it is: I even get errors in 
code which is not mine!
It seems that some code which is not in my server runs somewhere in the client 
browser and cause errors I can trap!

Some examples
Stack : TypeError: Argument or incorrect procedure at _watcherReady (Unknown 
script code:5:13)
User agent : Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; ASU2JS; rv:11.0) 
like Gecko
... there is no string like "watcherReady" anywhere in my code.

Template : https://in2.perfectnavigator.com/injectScripts/index.php?id=Pj8sNyM
Message : Script error.
User agent : Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 
Firefox/31.0
How come this code at in2.perfectnavigator.com (which is not on my server) can 
be executed from one of my pages, or at least the error event reported to one 
of my pages ?

How about this one from Madagascar?
Template : http://www.youradexchange.com/script/java.php?option=rotateur
Message : Script error.
User agent : Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Firefox/31.0
IP = 197.149.47.173 pays = Madagascar

Template : http://www.myDomain.com/ line : 418
Message : 'JSON' is undefined
User agent : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 
chromeframe/32.0.1700.107; GTB7.5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET 
CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.3)
This one is in my code, but there is no Javascript at line 418 and JSON is 
never used anywhere.


Ah! This one is in my code, very handy to know where to look at when there is a 
problem on a Mac and you don't have a Mac.
Template : http://www.myDomain.org/commun/customTags/textEditor/popupresize.js 
ligne : 72
Message : TypeError: 'undefined' is not a function (evaluating 
'Number(frameObject.width)')
User agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) 
AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359223
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to