VB6 - How to catch exception or error during runtime -


i developed application in vb6. in client's environment raises runtime errors can't reproduce under debugger. there way stacktrace or location of error? created log file and

used err.description,err.source gives blank values.

please me.

 method(......      on error goto error_handler               .........     error_handler :                    writetologfile(err.source,err.description) 

you've done clear err object before writing log file. very, easy do. you'll want detect error has occurred, grab error message before doing anything else. pass error message whatever logging routine you're using. e.g.:

dim smsg string  on error goto errhandler  ' ...code here...  exit function  errhandler: smsg = "error #" & err.number & ": '" & err.description & "' '" & err.source & "'" gologtheerror smsg 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -