Error Handling duplication?

GBalcom

Much to learn!
Local time
Today, 07:09
Joined
Jun 7, 2012
Messages
460
I searched quickly and didn't find what I need...

Is it prudent to use error handling on a subroutine which simply calls a routine that already has error handling? I don't mind doing it, but I feel it's making my code much longer than need be...

I do plan on this being a run-time operation if that matters...Please see code below as an example

Code:
Private Sub cboCatID_DblClick(Cancel As Integer)
On Error GoTo Error_Handler
    

DblClickAddCat "Category", "frmMSDSCat"


Exit_Procedure:
    On Error Resume Next
    Exit Sub
    
Error_Handler:
    DisplayErr Err.Number, Err.Description, "frmMSDS", "cboCatID_DblClick"
    Resume Exit_Procedure
    Resume
End Sub
 
I don't think you gain much in this instance...however if you are going to compile this to an MDE I would leave it in there, MDE's or ACCDE's don't like unhandled exceptions so a little extra precaution is not a bad idea.
 

Users who are viewing this thread

Back
Top Bottom