[Chandler-dev] don't eat tracebacks !

Andi Vajda vajda at osafoundation.org
Tue May 9 09:58:27 PDT 2006


I noticed that several functional tests are eating tracebacks instead of 
reporting them, in code like this:

     try:
         collection = share.get()
     except:
         logger.Stop()
         logger.ReportFailure("Importing calendar: exception raised")
     else:
         App_ns.sidebarCollection.add(collection)
         User.idle()
         logger.Stop()
         logger.ReportPass("Importing calendar")

This is not so helpful with debugging. I added a new method to the QALogger, 
called ReportException which appends a traceback to the message before 
passing it on to ReportFailure.

     try:
         collection = share.get()
     except:
         logger.Stop()
         logger.ReportException("Importing calendar")
     else:
         App_ns.sidebarCollection.add(collection)
         User.idle()
         logger.Stop()
         logger.ReportPass("Importing calendar")

This is not yet checked in as it is part of another fix which remains to be 
approved for alpha 2 (or not).

Andi..


More information about the chandler-dev mailing list