← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/fix-exception-form into lp:openlp

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/fix-exception-form into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/fix-exception-form/+merge/193329

Fixed the problems with the exception form. Not sure how to test it though...
-- 
https://code.launchpad.net/~raoul-snyman/openlp/fix-exception-form/+merge/193329
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/fix-exception-form into lp:openlp.
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py	2013-10-13 20:36:42 +0000
+++ openlp/core/__init__.py	2013-10-30 20:37:34 +0000
@@ -184,7 +184,8 @@
         ``traceback``
             A traceback object with the details of where the exception occurred.
         """
-        log.exception(''.join(format_exception(exctype, value, traceback)))
+        # We can't log.exception here because the last exception no longer exists, we're actually busy handling it.
+        log.critical(''.join(format_exception(exctype, value, traceback)))
         if not hasattr(self, 'exception_form'):
             self.exception_form = ExceptionForm()
         self.exception_form.exception_text_edit.setPlainText(''.join(format_exception(exctype, value, traceback)))

=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py	2013-10-13 20:36:42 +0000
+++ openlp/core/ui/exceptionform.py	2013-10-30 20:37:34 +0000
@@ -101,7 +101,7 @@
         """
         Constructor.
         """
-        super(ExceptionForm, self).__init__(self.main_window)
+        super(ExceptionForm, self).__init__()
         self.setupUi(self)
         self.settings_section = 'crashreport'
 


References