Link to home
Start Free TrialLog in
Avatar of adinas
adinas

asked on

"On error" in ASP

Can some please give me an example (code) of using the "on error" statement in ASP

What I want is an email sent to me if an error accurs anywhere on the page. I know how to send an email using ASPMail (or ASPEmail) but how do I trigger the email being sent??
ASKER CERTIFIED SOLUTION
Avatar of clockwatcher
clockwatcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adinas
adinas

ASKER

Thanks for the answer its working perfectly.

But what if I do want the page to STOP proccessing but I still want the email sent to me? Is there a variation to the "on error resume next" command?
Avatar of adinas

ASKER

What you can do is redirect the user to a standard error page you create when an error happens. something like "Sorry, an error has occurred in the application...". If its for debugging, you will just have to comment the "on error" line when in debugging.