|
-
Dec 24th, 2006, 10:12 AM
#2
Addicted Member
Re: On Error
 Originally Posted by Vntalk
Is There AnyWay To Catch An Error On A Form Or A Module, And Write To A Text File Each Time It Occur
Like This:
VB Code:
On Error GoTo description:
description:
WriteFile(Err.Description & Function/Sub Name)
Yes you can do this. This is a commonly used tactic. What part of this do you have questions about?
An important concern is what to do with the error besides logging it. Once the error is logged you have to deal with the cause of the error. Also, you have to be very careful to preserve the information about the error so it is not lost while you are logging. Another thing is to make sure you are handling errors in your logging code, while at the same time not interferring with the operation of your applications main line of logic.
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
|