Python Services and excepthook (not working)

Discussion in 'Python' started by Larry Bates, Mar 5, 2004.

  1. Larry Bates

    Larry Bates Guest

    In an attempt to catch all exceptions that might
    happen in my program, I have set an excepthook
    so that I can catch the exception, get the
    traceback and log it to a file. This works like
    a charm for "normal" Python programs. I have
    just begun to write Python services and this
    methodology doesn't seem to work any more. It
    appears that some other function is taking over
    my excepthook and writes the traceback to the
    Event Log (not a bad thing, just not what I want).
    I would like to get back control so I can log
    the exception to my log file (and email a message
    to the administrator).

    Anybody got an idea how I might accomplish this?

    Thanks in advance,
    Larry Bates
    Syscon, Inc.
    Larry Bates, Mar 5, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Follower
    Replies:
    1
    Views:
    3,022
    Jeremy Fincher
    Oct 27, 2003
  2. Tim Peters
    Replies:
    0
    Views:
    563
    Tim Peters
    Oct 30, 2003
  3. Peter Hansen
    Replies:
    0
    Views:
    474
    Peter Hansen
    Apr 10, 2006
  4. Larry Bates

    Python 2.5b2 and excepthook problem

    Larry Bates, Aug 7, 2006, in forum: Python
    Replies:
    0
    Views:
    300
    Larry Bates
    Aug 7, 2006
  5. Dave Cook
    Replies:
    2
    Views:
    335
    Philipp Hagemeister
    Jun 13, 2012
Loading...

Share This Page