What options are there in ASP Classic for error handling?
For example:
I'm using the Mail.SendMail
function but when switching on the testing server it doesn't work, which is normal. I want to test if mailing is possible, if not then continue and/or show a message.
Any ideas?
Best Answer
There are two approaches, you can code in JScript or VBScript which do have the construct or you can fudge it in your code.
Using JScript you'd use the following type of construct:
In your ASP code you fudge it by using on error resume next at the point you'd have a try and checking err.Number at the point of a catch like: