|
-
Oct 26th, 2002, 01:25 PM
#1
Thread Starter
Lively Member
Global Error Handlers
Are there any means of handling errors globally? Also, how do I determine what kind of error the error is.
I would like to have my application detect an error, then message the user that there is an error, save the users work, then close the application.
Handling the errors globally would make this much simpler and efficient. Thanks fallas.
"Some love is fire, some love is rust. But the finest, cleanest love is lust." - James Bond
-
Oct 26th, 2002, 01:30 PM
#2
Good Ol' Platypus
I think if you used a Sub Main() style thing, with this:
VB Code:
Public bExit As Boolean 'Form1 sets this to true when they want to quit!
Public bError As Boolean 'Form1 sets this to true when there's an error!
Public Sub Main()
Form1.Show
Do
DoEvents
Loop Until bExit = True Or bError = True
If bExit Then
End
Else
Msgbox "There has been an error......"
...
End If
End Sub
Or maybe just having error handling in the form_main event would do; Seeing as not specifying LOCAL in the On Error statement makes it react to Subroutine calls erroring out, it (MIGHT) do the same. I don't think so though!... 
There is probably a really easy solution, I don't know what it is, if it exists.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 26th, 2002, 01:31 PM
#3
#1 Nope. error handling must be done on a procedure by procedure basis.
#2 Use the Err object to get the error number, description, etc.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|