devxlogo

Getting Procedure Location Name

Getting Procedure Location Name

Question:
Can I get the name of the procedure that an error has occurred in?For example, I would like to send my error to a form that containsthe error number, the description, form name and the procedure name(like load_form, Next_rec, etc….) I am currently using err.description,err, and err.source for the project name. Now I need the procedure namethat the error occurred in.

Answer:
At the last VBITS, the guys from Microsoft said that they were planning to put this functionality into the next version. In the meantime, I would create a global variable that is set within each procedure to the procedure name. This way, when an error pops, you have the information you supplied to yourself. Since you’re using a local error handler already, you can just pass the procedure name. However, the short answer is that no, you can’t get the procedure name.

See also  How College Students Can Shape the Future of Tech Responsibility
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist