Hi,
I am using javascript in a server side asp page.
I have created an applicationlog class that writes to the NT event log.
Its use is as follows:
try
{
throw new Error(-1,"error");
}
catch(exError)
{
new
ApplicationLog().LogError(exError.number,exError.description,LineNumber);
}
My question is:
Is it possible to determine the line number that the class is used on, to
fill the LineNumber parameter. At the moment I am hardcoding it and its a
bit stupid to change lots of code if I add a line to the file. The Error
object doesnt have a line number property as far as I know.
Any help would be greatly appreciated.
Thanks,
>> Stay informed about: Line Number