|
-
Aug 20th, 2001, 11:24 AM
#1
Thread Starter
New Member
Error Handling...
What is the best and most efficient way of location exactly WHICH line causes an error? i use the on error statement most, but i have to put one on Every line until i can narrow down the error cause, is there one line/function that can do all that?
-
Aug 20th, 2001, 11:45 AM
#2
Fanatic Member
Info.
When you get an error, click the debug button which appears, and the VB IDE should go directly to the line which caused the error. The line will be highlighted yellow if you use the default IDE settings...
You can also set Breakpoints in your code to aid in debugging...
Hope this helps.
Digital-X-Treme
Contact me on MSN Messenger: [email protected]
[VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
/ (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]
-
Aug 21st, 2001, 11:28 AM
#3
Thread Starter
New Member
I'm using error handlers
Unfortunately my prog has a load of error handlers in it right now, a bunch of On error resume next... when i think there is an error occuring, intercede a:
on error goto newError1
newError1:
msgbox err.number & ": " & err.description
resume next
but unfortunately, when i break i go to the msgbox line, not the line that caused the error... how do i get it to go to the error'd line?
-
Aug 21st, 2001, 01:47 PM
#4
One way is to remove the error handlers, and follow Digital Extreme's instructions. Once you get the line number, then you can put your error handlers back in.
-
Aug 21st, 2001, 01:47 PM
#5
Hyperactive Member
It may not help, but remember Erl.
td
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|