Empty Err Number

I

ionpopescu

I have this code in an ASP class:

If Err.Number <> 0 then
'error handling here...
End If

The code worked just fine. Now, when I debug, Err.Number and
Err.Description are empty, so, of course, as Err.number is no longer 0,
the error handling part gets executed, aborting the normal execution
even though there's no actual error in my code.

I have googled it, but the only hint I found is that this happens if
you do a "Dim Err" in your code. I haven't.

Does anybody have any idea why the Err object behaves this way, and is
there a workaround so that I do not have to change every "If Err.Number
<> 0" in my code?

Thanks,
Doru
 
B

Bob Barrows [MVP]

ionpopescu said:
I have this code in an ASP class:

If Err.Number <> 0 then
'error handling here...
End If

The code worked just fine. Now, when I debug, Err.Number and
Err.Description are empty, so, of course, as Err.number is no longer
0, the error handling part gets executed, aborting the normal
execution even though there's no actual error in my code.

I have googled it, but the only hint I found is that this happens if
you do a "Dim Err" in your code. I haven't.

Does anybody have any idea why the Err object behaves this way, and is
there a workaround so that I do not have to change every "If
Err.Number <> 0" in my code?

Thanks,
Doru

This only happens when you debug? What are you using to debug?
 

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
474,266
Messages
2,571,082
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top