I have a standard ErrorHandler procedure that is called by all other procedures if they encounter an error (easier to have one module called rather than re-code it for each procedure in my DB). When procedures call this standard ErrorHandler, they need to pass variables to it in order to display the Error Number and Error Description so that I have some information to go off of when troubleshooting. This is all working fine, but now I would like to add in the Procedure name and/or Module name to the message box so that I have more information as to where a possible problem could occur.
Does anyone know of a built-in function that will return the current Procedure name and/or Module name rather than hardcoding a variable in each procedure to store this information?