Still returns the same error. New code:
Spoiler:
js code:
var Debugger =
{
"Start" : new Date(),
"Data" : [],
"Trace" : function(Text)
{
if (Messenger.MyStatus > 1)
{
try
{
if (Registry.Read("Options\\ChkDebug"))
{
Debug.Trace(Text);
Debugger.Data.push(Text);
}
}
catch (error)
{
Debug.Trace(Text);
Debugger.Data.push(Text);
}
}
else
{
Debug.Trace(Text);
Debugger.Data.push(Text);
}
},
"Call" : function(Function, Parameters)
{
var Notif = Function.substr(Function.length - 19, Function.length);
if (Notif !== "MessageNotification" || (Notif === "MessageNotification" && Registry.Read("Options\\ChkDebugNotif")))
{
Debugger.Trace("=================================================================");
Debugger.Trace("** Event called: " + Function + " **");
Debugger.Trace("Call time: " + new Date());
Debugger.Trace("-----------------------------------------------------------------");
var Count = 0;
for (var Parameter in Parameters)
{
Debugger.Trace("|| " + Parameter + ": " + Parameters[Parameter]);
Count++;
}
if (Count === 0)
{
Debugger.Trace("(no attached parameters)");
}
Debugger.Trace("=================================================================");
}
},
"Catch" : function(Function, Error)
{
Debugger.Trace("/////////////////////////////////////////////////////////////////");
Debugger.Trace("** Error in: " + Function + " **");
Debugger.Trace("Description: " + Error.description + " (" + Error.number + ")");
Debugger.Trace("Error time: " + new Date());
Debugger.Trace("/////////////////////////////////////////////////////////////////");
},
"Save" : function(Path)
{
var TextFile = FSO.CreateTextFile(Path, 2);
TextFile.WriteLine("");
TextFile.WriteLine("=================================================================");
TextFile.WriteLine("**************** Interface Writer: Debugging Log ****************");
TextFile.WriteLine("-----------------------------------------------------------------");
TextFile.WriteLine("Start time: " + Debugger.Start);
TextFile.WriteLine("=================================================================");
TextFile.WriteLine("");
for (var X in Debugger.Data)
{
TextFile.WriteLine(Debugger.Data[X]);
}
TextFile.WriteLine("");
TextFile.WriteLine("=================================================================");
TextFile.WriteLine("End time: " + new Date());
TextFile.WriteLine("=================================================================");
TextFile.Close();
}
}