Results 1 to 6 of 6

Thread: Errors and their source

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    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

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Post

    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

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    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

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Post

    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

  5. #5
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    As I understand, there are no source codes or lines at all in compiled programms, only the machine's codes.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width