[Zope-dev] not getting any backtrace on product import

Jonothan Farr jfarr@real.com
Wed, 12 Jan 2000 16:46:57 -0800


> I'm developing a new product and if there is any error ( syntax or
whatever )
> when I restart zope, it fails to print anything to let me know what went
> wrong.  The product just isn't in the list of 'Available objects' in the
> management screen.  Is there anyway to get this basic information..?

I just use this bit of code in the __init__.py file for my product.

try:
    [init statements]...

except:
    import sys, traceback
    traceback.print_exc(file=sys.stderr)

-jfarr

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm a signature virus.
Copy me into your .sig to join the fun!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~