Computing.Net > Forums > Web Development > catching error

catching error

Reply to Message Icon

Original Message
Name: darkhalf
Date: December 6, 2005 at 07:22:08 Pacific
Subject: catching error
OS: redhad (8,9) mandrake (8.
CPU/Ram: athalon
Comment:

Hi,

I'm attemtping to catch, and ignore javascript errors... It works for certain messages, but others still get through. Could anyone help me out with this? I'm pulling data, and putting it to an Excel sheet, and Excel is very fragile which is why I want to ignore and continue... The one error message that seems to always get through is "Call was rejected by callee."

window.onerror = handleErrors
function handleErrors(msg, url, line)
{
createLog(msg,line);
return (true);
}

function createLog(msg,line)
{
var fs = new ActiveXObject("Scripting.FileSystemObject");
var path = getPath();
path += "\\logs\\" + timeStamp() + ".txt";

if (!fs.FileExists(path))
var a = fs.CreateTextFile(path, true);
else
var a = fs.OpenTextFile(path, 8, false);

for (i=0;i<appRunningArr.length;i++)
if (appRunningArr[i] == true)
{
runningApp += listAppArr[i] + " ";
restartApp(listAppArr[i]);
}

a.WriteLine("Error occured at: " + getTime());
a.WriteLine("Message: " + msg);
a.WriteLine("Line: " + line);
a.WriteLine("Running application(s): " + runningApp);
a.WriteLine("");
}


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: catching error

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge