errorhandling inc-files

P

Passero

I have a rather big project written in ASP 3.0. It has more dan 200
pages and i have 4 inc-files with general functions that are used in
almost al the pages.
When an error occures, i get a mail with the description, file were the
error did occur but the problem is that when the error occures in the
inc file i get the name of the inc file as page. This is rather
difficult because i want to know where the error occured in the ASP
page. Is this possible or how can i get the name of that ASP page. Some
sort of a stack trace. It would be great if i also can get the number
where the function is called in the inc file but i don't think that
would be possible.
 
B

Bob Barrows [MVP]

Passero said:
I have a rather big project written in ASP 3.0. It has more dan 200
pages and i have 4 inc-files with general functions that are used in
almost al the pages.
When an error occures, i get a mail with the description, file were
the error did occur but the problem is that when the error occures in
the inc file i get the name of the inc file as page. This is rather
difficult because i want to know where the error occured in the ASP
page. Is this possible or how can i get the name of that ASP page.
Some sort of a stack trace. It would be great if i also can get the
number where the function is called in the inc file but i don't think
that would be possible.

This is not possible without modifying each of the 200 pages that call the
functions in the inlude files - sorry.

You will need to put some error-handlers in your pages. This can be as
simple as
on error resume next
call function_in_inc_file()
if err <> 0 then
HandleError err
end if

or, you can make it a little more useful by doing something like this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;299981
or this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;299986
or this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;288965


HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top