Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

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 contains the 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 name that 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.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date