PDA

Click to See Complete Forum and Search --> : Errors and their source


chrisjk
Jan 11th, 2000, 06:28 AM
Hi

Does anyone know how I can get a message box to display the line of code that caused an error? I've tried things like Err.Source, but that just shows the name of the project (so much help...not!).

If not, then can I get it to at least display the line number...?

Any help much appreciated

Regards,

------------------
- Chris
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)

MartinLiss
Jan 11th, 2000, 06:41 AM
Do a search for other posts that dealt with line numbers. If you are debugging and you want to know the offending line, you can put a temporary(!) Resume in your error routine, place a breakpoint on that line, and press f8.

------------------
Marty

chrisjk
Jan 11th, 2000, 06:51 AM
Martin, thanks. I already searched for things like "Error source" and "line number" and several variants before posting, but nothing really answered my query.
I'm not debugging, it's so end users can simply tell me the line number of the code or the code itself that is causing the error over the phone. They will only have a compiled EXE.

Regards,

------------------
- Chris
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)

MartinLiss
Jan 11th, 2000, 08:34 AM
I support several large apps and I have never needed to know the line number of an error. All that I have found to be necessary are meaningful error messages that display the name of the routine the error occurred in, the err.nbr and err.description, etc.

------------------
Marty

LG
Jan 11th, 2000, 08:59 AM
As I understand, there are no source codes or lines at all in compiled programms, only the machine's codes.

chrisjk
Jan 11th, 2000, 09:01 AM
Good point LG! Oh well, i just thought it would be a nice idea that would save me some hassle.

Thanks all

Regards,

------------------
- Chris
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)