Site home page Previous Contents Next

up yvErrorHandler - universal error handling and logging

Access XP, 2000, 97, ...; VB 6, 5, ...

Download yvErrorHandler v.1.12, (36129 bytes): Download yvErrorHandler

yvErrorHandler features

 yvErrorHandler.bas module has quite a lot of external dependencies. So it is distributed as a part of complete VB application, that you may use as a template.

Example of yvErrorHandler usage

Const conModuleName = "frmMain"

' ...

Private Sub cmdAdoError_Click()
Const conModuleSubName = conModuleName & ":" & "cmdAdoError_Click"
Dim strSql As String
Dim strDescr As String
Dim RecordsAffected As Long
  On Error GoTo ErrProc
  
  strDescr = "Trying to update sometable..."
  strSql = "Update Sometable Set Column1='www'"
  AppGlobals.cnn1.Execute strSql, RecordsAffected, adCmdText
  
ExitProc:
  On Error Resume Next
  Exit Sub
  
ErrProc:
  'This is a call to yvErrorHandler
  ShowErrorSql conModuleSubName, strSql, strDescr
  Resume ExitProc
End Sub

    

You may find additional examples in the sample application, included in yvErrorHander distribution package.


Author: Yuri Volkov
Last changed: 2003-10-06