|
-
Oct 15th, 2000, 01:43 PM
#16
transcendental analytic
Error handling!! Yeah, this one i'm sure not many knows, at least those who haven't used qbasic 
ERL - ERROR LINE (where did the error occur?)
Code:
On Error GoTo handler
1: Err.Raise 9
2: Err.Raise 10
a: Err.Raise 11
3: Err.Raise 12
Exit Sub
handler:
MsgBox "Line number:" & Erl & " Error Number:" & Err & " description:" & Err.Description
Resume Next
Note, the label a: will refer back to 2, so use numbers as labels, and use text labels to make "groups"
well, i guess you know the other way to handle errors, with on error resume next, you already know what line cause them, but on the other hand it may be a mess with integrated error handling.
On Local error resume next - will only catch errors from withing current procedure.
On error goto 0 - ends the error handling sometimes you need to do that.
well i hope i got you enough about error handling.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|