Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Line Number

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Compatibility Issue  
Author Message
coates

External


Since: Oct 01, 2003
Posts: 5



(Msg. 1) Posted: Wed Oct 01, 2003 1:31 pm
Post subject: Line Number
Archived from groups: microsoft>public>inetserver>iis (more info?)

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 
Back to top
Login to vote
bbooth

External


Since: Oct 10, 2003
Posts: 68



(Msg. 2) Posted: Fri Oct 10, 2003 10:29 pm
Post subject: RE: Line Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gino,

I am not an ASP developer but you could probably get something to work by
using "Server.GetLastError". Look at the 500-100.asp error page for sample
code.

"\WINDOWS\Help\iisHelp\common\500-100.asp"

Thanks,
Brian

 >> Stay informed about: Line Number 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]