The truth re On Error Resume Next

L

Laphan

Hi Everybody

I put the On Error Resume Next command as the very first line in my ASP
pages, which may contain various inc files and sub-routines/functions, so
that I can try and stop the dreaded DB error messages displaying to visitors
and would-be hackers.

My question is, does this one statement at the top of the page cater for all
of the code that might be executed in the page, in the include files and in
sub-routines/functions or do I have to put the statement in certain places
as well?

The reason I ask is that I'm sure if I get one of my include file names
wrong it brings up an error rather than going straight through and
displaying a funny page.

I hope I don't have to put it in various places as I like to have this one
statement so that I can flip back and forth between live and dev time and
having to go into 'x' amount of pages to flip between these 2 states would
be tiresome.

Many thanks.

Rgds

Laphan
 
B

Bob Barrows [MVP]

Laphan said:
Hi Everybody

I put the On Error Resume Next command as the very first line in my
ASP pages, which may contain various inc files and
sub-routines/functions, so that I can try and stop the dreaded DB
error messages displaying to visitors and would-be hackers.

My question is, does this one statement at the top of the page cater
for all of the code that might be executed in the page, in the
include files and in sub-routines/functions or do I have to put the
statement in certain places as well?
I can't say it better than this. (There are related articles about
error-handling in this blog so search them out. Also, be sure to read the
comments)
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top