Muthu Ram
October 4th, 1999, 01:40 PM
How do i propogate the error back to the calling function, and let that function handle it? I am using err.raise but for some reason its not handled in the calling function. It always results in runtime error. BTW, i have an error handler in the calling function.
'function called
public Function Add(objfav as clsFavorites, optional key as Variant) as clsFavorites
'some details omitted for clarity
on error GoTo raiseError
'set the properties passed into the method
mCol.Add objfav, key
'return the object
set Add = objfav
Exit Function
raiseError:
Err.Raise Err.Number
End Function
'function called
public Function Add(objfav as clsFavorites, optional key as Variant) as clsFavorites
'some details omitted for clarity
on error GoTo raiseError
'set the properties passed into the method
mCol.Add objfav, key
'return the object
set Add = objfav
Exit Function
raiseError:
Err.Raise Err.Number
End Function