On 4/11/07, King Simon-NFHD78 <[EMAIL PROTECTED]> wrote: > > > Roger Demetrescu wrote: > > Do you mean using the traceback module ? I've just searched about it > > and I guess I should use this: > > > > try: > > # do my stuff > > except: > > traceback.print_exc(file=sys.stdout) > > raise > > > > > > Is this the best way to show the stack trace ? > > > > That would be one way to do it. If you are using the python logging > module, another way would be to use the logger.exception method, which > automatically adds the exception info, including the traceback, into the > log message. > > Ie. > > try: > # do your stuff > except: > logging.exception('Oops, an exception occurred') > # or use <your_logger_instance>.exception > raise
Cool... I am using python logging... I'll try your suggestion... :) Thanks again, Roger --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---