Author Topic: Email on Error  (Read 889 times)

0 Members and 1 Guest are viewing this topic.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Email on Error
« on: October 15, 2007, 03:08:52 PM »
I have never tried this, nor do I know where to begin, but here goes.  Is there a way to tie an Unhandled Error to an email so that when a user breaks something (read finds an error I didn't account for) I can get an email telling me which module, and which line?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

Guest

  • Guest
Re: Email on Error
« Reply #1 on: October 15, 2007, 03:50:33 PM »
Maybe this will be of some help??

http://www.theswamp.org/index.php?topic=12796.0

Bob Wahr

  • Guest
Re: Email on Error
« Reply #2 on: October 15, 2007, 04:46:16 PM »
Duh,

I did this a few years ago.  Doubt I still have it although it's possible but I will rework it if needed. I think I referenced the Outlook library for the emailing part, used err.Source for the file name, set a string to the sub name at the beginning of the sub, and I think I just had the error, not the line it occurred on.  Not sure how to get that but will look into it when I have some time.

Bob Wahr

  • Guest
Re: Email on Error
« Reply #3 on: October 15, 2007, 04:47:31 PM »
MattW's answer > mine

Guest

  • Guest
Re: Email on Error
« Reply #4 on: October 16, 2007, 08:19:43 AM »
If your office is like mine you might have a hard time getting the email to be sent automatically (if the IT twits have restrictions in place to guard against that type of thing).  An alternative is to log the error, program name, module, user, time, etc... to a log file on the network somewhere - a location that everyone has read/write access to of course.  Or maybe individual logs with the user's name as the filename to easily keep track of who's breaking what??!?

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Email on Error
« Reply #5 on: October 16, 2007, 09:29:43 AM »
hadnt thought of that, might give that a try
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second