Ticket #1703: 0001-Log-saving-errors-in-activities.patch

File 0001-Log-saving-errors-in-activities.patch, 1.2 KB (added by tomeu, 13 years ago)
  • src/sugar/activity/activity.py

    From f320a7b8120d5705db13d9e670b2b667c3db2c1e Mon Sep 17 00:00:00 2001
    From: Tomeu Vizoso <tomeu@sugarlabs.org>
    Date: Sat, 6 Feb 2010 13:11:22 +0100
    Subject: [PATCH] Log saving errors in activities
    
    ---
     src/sugar/activity/activity.py |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
    index d4892d0..3655210 100644
    a b class Activity(Window, gtk.Container): 
    517517        if self._closing:
    518518            self._show_keep_failed_dialog()
    519519            self._closing = False
    520         logging.debug('Error saving activity object to datastore: %s', err)
     520        raise RuntimeError('Error saving activity object to datastore: %s', err)
    521521
    522522    def _cleanup_jobject(self):
    523523        if self._jobject:
    class Activity(Window, gtk.Container): 
    769769            try:
    770770                self.save()
    771771            except:
    772                 logging.info(traceback.format_exc())
     772                logging.exception('Error saving activity object to datastore')
    773773                self._show_keep_failed_dialog()
    774774                return False
    775775