Daemon terminates unexpected

Fredrik Lundh fredrik at pythonware.com
Mon Feb 6 05:07:32 EST 2006


so does your subject line.

Stefan Neumann wrote:

>    try:
>        main()
>    except Exception,e
>        <write exception>

note that "except Exception" doesn't, in today's Python, catch all
possible exceptions.

>>> class MyException:
...     pass
...
>>> try:
...     raise MyException
... except Exception:
...     print "got it!"
...
Traceback (most recent call last):
  File "<stdin>", line 2, in ?
__main__.MyException: <__main__.MyException instance at 0x00984E18>

try replacing

    except Exception, e:

with

    except:
        e = sys.exc_value()

and see if this helps you find the error.

</F>






More information about the Python-list mailing list