[AccessD] Handing error back down call stack?

Ryan W wrwehler at gmail.com
Thu Jun 16 08:51:28 CDT 2022


What's the best / ideal way to hand an error back down the call stack?

Say I have

Public Function FooBar()
on error goto handler

 call BarFoo

exitroutine:
 'cleanup code here
 exit function

handler:
  msgbox err.number & " " & err.description & " in routine FooBar"
  resume exitroutine
End Function

I want the error from BarFoo to come back to function FooBar so I can
handle it there. As of right now the error handler in BarFoo throws the
error but I need to catch it in the calling procedure.

Right now it seems like if I trap the err.number and err.description into
variables and Err.Raise those in my error handler in the called function
might be the way to go?


More information about the AccessD mailing list