English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

And yes I know about the err object. I need something that will let me record a history of errors for showing the user. It needs to log to file or database and allow viewing of the error history. It also needs to allow maintenance of the error history.

2007-03-10 03:24:02 · 2 answers · asked by Zefram 2 in Computers & Internet Programming & Design

2 answers

The app object

app.logpath
app.logevent

2007-03-10 15:43:10 · answer #1 · answered by MarkG 7 · 0 0

I always name my Error handling routines as follows:

procedurename_err

IE: If the procedure is called

Private Sub LoadListBox()
...
End Sub
The error routine would be called
LoadListBox_Err

Here's How I would use is:

Private Sub LoadListBox()
On Error goto LoadListBox_Err
main routine body
...
EXIT_POINT:
EXIT SUB

LoadListBox_Err:

Open app.path & "\errors.log" for Append as #2

Print #2, err.number, err.description

Close #2

End Sub

===
For a nice database to store code snips in, check out CodeBank. It is available in source code form at the following website:

http://www.rxkinetics.com/codebank.html

2007-03-10 14:24:52 · answer #2 · answered by Richard H 7 · 0 0

fedest.com, questions and answers