473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Empty Err Number

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

Jul 22 '05 #1
2 1722
Did you Use "On error resume next" or "Err.Clear" above that If in your
code?

Jul 22 '05 #2
ionpopescu wrote:
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?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
10
by: Agent Mulder | last post by:
Hi group, Almost 3 weeks ago I posted a short question here and in comp.std.c++ and I got exactly 1 respons, from Kevin Goodsell. He said he didn't want it. I post it here again, this time in a...
2
by: Knuut Olsen-Solberg | last post by:
(Windows XP, Borland C++ Builder5 Console program.) Is there some function for emptying the inbuffer? Look at this: #include <iostream.h> #include <conio.h> int main() { double Number;
4
by: Ramiro Barbosa, Jr. | last post by:
All, In regards to the call below, I was wondering why is it that the 'szMessage' receiving buffer results in an empty one, but by printing 'ret' it indicates the number of bytes I am indeed...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
7
by: Clinton Pierce | last post by:
I'm calling a method in another assembly that's supposed to return a string, and possibly that string might be empty. The code looks something like this: string d = r.Field("date").ToString();...
9
by: Rene | last post by:
I am using the Guid.Empty value ("00000000-0000-0000-0000-000000000000") to represent a special meaning. The problem is that I don't know if there is a chance that a command like...
8
by: Ottar | last post by:
I have a few numeric fields, and when I update i get the error: "Input string was not in a correct format". Next line:" System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&...
4
by: nescio | last post by:
hello, i am building a function that checks whether a entered number is a valed number. this works fine, but there is a small problem: - when there is an empty space in the number or when...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.