Results 1 to 4 of 4

Thread: Error Logging

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    I am using VB5. Just wondering if for unexpected errors there is a way to programmatically get the current procedure name for the error handling routine to log out.

    i.e.

    Code:
    On Error Goto ErrorHandler
    
        Err.Raise 1234
    
        Exit Sub
    
    ErrorHandler:
       Msgbox "Error in Procedure: " & ?ProcedureName? & ". " & Err.Description

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Vb-World to the rescue...i believe this is what you need:
    http://www.vbsquare.com/tips/tip466.html

    Hope that helps,
    D!m
    Dim

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    Its not the logging to file thats the problem. More finding out which procedure is currently executing. Just hate changing everytime. Be nice is there was some sort of function that would return the name of the current procedure.

  4. #4
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Take a look at http://www.vbsquare.com/tips/tip416.html
    then...i think this ""Source: " & sSource" section sounds like it would show the source for the error.


    gl,
    D!m
    Dim

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