|
-
Aug 18th, 2000, 11:42 AM
#1
Thread Starter
New Member
hi everybody!
i'm developing a vb app that is distributed on a product cd that is given to all customers of a very big company. that's why this app should be safe enough that it works on all well and not-well working systems of all that customers.
'till today we've tested the app on many computers and got most different errors from automation errors (by the way: what's that???), errors that a control (mediaplayer) used in the main form does not exist on the target system and so on...
my Q: how can i protect my application (actually it's an intro that plays an mpeg and then starts the html product pages) by capturing occuring run time errors and continuing with starting the browser for the html product pages in this case?
thank you VERY much for your help!!!
matthias path
-
Aug 18th, 2000, 11:50 AM
#2
You can use Error Handling.
Code:
'This statement will ignore the error and continue execution of the program
On Error Resume Next
Code:
'This statement will goto ERRH when an Error occurs. Form there, you can handle it however you want.
On Error Goto ERRH
'<--Code Here-->
Exit Sub
ERRH:
'Handle the Error here
-
Aug 18th, 2000, 11:57 AM
#3
Lively Member
I was going to reply with the same thing you posted, Megatron, but it almost seemed too obvious.
m.path,
If you know the error codes you can handle them anyway you want to in the error handler.
Code:
On Error Goto ErrHandler
ErrHandler:
If Err.Number = <YOUR RUN TIME ERROR> Then
'do whatever you want
Else
'do whatever
End if
-
Aug 18th, 2000, 12:16 PM
#4
you can record the errors like this
Code:
Private Sub Command1_Click()
On Error GoTo DoStuff
'code code code
Exit Sub
DoStuff:
Dim FF As Integer
FF = FreeFile
Open "c:\errlog.txt" For Append As FF
Print #FF, "The Error " & Err.Number & " " & Err.Description
Close FF
End Sub
-
Aug 18th, 2000, 12:24 PM
#5
Fanatic Member
For a new person starting out. What is the best way of trying to determine all the possible errors that could occur? Just handle each error as it is made know to you by testing or an end user or include all possible errors known to the vb world. If it is the later is there a listing of the most common errors and typical ways of handling them?
Thanks
-
Aug 18th, 2000, 03:19 PM
#6
Lively Member
Steve65,
About the only way is trial and error.
Run time error lists in MSDN:
http://msdn.microsoft.com/library/de...ableerrors.htm
-
Aug 21st, 2000, 06:29 AM
#7
Fanatic Member
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
|