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

Proposed by Raoul Snyman
Status: Merged
Approved by: Tim Bentley
Approved revision: no longer in the source branch.
Merged at revision: 2309
Proposed branch: lp:~raoul-snyman/openlp/fix-exception-form
Merge into: lp:openlp
Diff against target: 25 lines (+3/-2)
2 files modified
openlp/core/__init__.py (+2/-1)
openlp/core/ui/exceptionform.py (+1/-1)
To merge this branch: bzr merge lp:~raoul-snyman/openlp/fix-exception-form
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+193329@code.launchpad.net

Description of the change

Fixed the problems with the exception form. Not sure how to test it though...

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

If you want to test it, just add a "raise Exception('moo!')" in a method like the "on_about_item_clicked" method.

Revision history for this message
Tim Bentley (trb143) :
review: Approve
2309. By Raoul Snyman

Fixed the problems with the exception form

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/__init__.py'
2--- openlp/core/__init__.py 2013-10-13 20:36:42 +0000
3+++ openlp/core/__init__.py 2013-10-30 20:37:34 +0000
4@@ -184,7 +184,8 @@
5 ``traceback``
6 A traceback object with the details of where the exception occurred.
7 """
8- log.exception(''.join(format_exception(exctype, value, traceback)))
9+ # We can't log.exception here because the last exception no longer exists, we're actually busy handling it.
10+ log.critical(''.join(format_exception(exctype, value, traceback)))
11 if not hasattr(self, 'exception_form'):
12 self.exception_form = ExceptionForm()
13 self.exception_form.exception_text_edit.setPlainText(''.join(format_exception(exctype, value, traceback)))
14
15=== modified file 'openlp/core/ui/exceptionform.py'
16--- openlp/core/ui/exceptionform.py 2013-10-13 20:36:42 +0000
17+++ openlp/core/ui/exceptionform.py 2013-10-30 20:37:34 +0000
18@@ -101,7 +101,7 @@
19 """
20 Constructor.
21 """
22- super(ExceptionForm, self).__init__(self.main_window)
23+ super(ExceptionForm, self).__init__()
24 self.setupUi(self)
25 self.settings_section = 'crashreport'
26