Merge lp:~kissiel/checkbox/error-logging-in-cbt-fixes into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 3923
Merged at revision: 3922
Proposed branch: lp:~kissiel/checkbox/error-logging-in-cbt-fixes
Merge into: lp:checkbox
Diff against target: 50 lines (+13/-5)
3 files modified
checkbox-touch/components/CheckboxTouchApplication.qml (+4/-0)
checkbox-touch/components/ErrorDialog.qml (+0/-2)
checkbox-touch/components/PythonObjectRef.qml (+9/-3)
To merge this branch: bzr merge lp:~kissiel/checkbox/error-logging-in-cbt-fixes
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+266356@code.launchpad.net

Description of the change

This MR fixes various problems with error loging in checkbox-converged.

3dcdf43 checkbox-touch: fix errorPopup rendering
0324544 checkbox-touch: display error popup when session cannot be started
fe95718 checkbox-touch: handle failed object creation in PythonObjectRef

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good, a bit weird on the indent in the middle patch but this aint python, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-touch/components/CheckboxTouchApplication.qml'
--- checkbox-touch/components/CheckboxTouchApplication.qml 2015-07-23 08:25:48 +0000
+++ checkbox-touch/components/CheckboxTouchApplication.qml 2015-07-30 06:03:43 +0000
@@ -51,6 +51,10 @@
51 sessionReady();51 sessionReady();
52 }, function(error) {52 }, function(error) {
53 console.error("Unable to start session: " + error);53 console.error("Unable to start session: " + error);
54 ErrorLogic.showError(mainView,
55 i18n.tr("Could not start a session. Reason:\n" + error),
56 Qt.quit,
57 i18n.tr("Quit"));
54 });58 });
55 }59 }
56 function resumeSession(rerunLastTest, providersDir, continuation) {60 function resumeSession(rerunLastTest, providersDir, continuation) {
5761
=== modified file 'checkbox-touch/components/ErrorDialog.qml'
--- checkbox-touch/components/ErrorDialog.qml 2014-11-11 05:46:42 +0000
+++ checkbox-touch/components/ErrorDialog.qml 2015-07-30 06:03:43 +0000
@@ -58,8 +58,6 @@
5858
59 Dialog {59 Dialog {
60 id: dlg60 id: dlg
61 width: errorDialog.width
62 height: errorDialog.height
63 title: i18n.tr("Error encountered")61 title: i18n.tr("Error encountered")
6462
65 Label {63 Label {
6664
=== modified file 'checkbox-touch/components/PythonObjectRef.qml'
--- checkbox-touch/components/PythonObjectRef.qml 2015-05-27 06:51:12 +0000
+++ checkbox-touch/components/PythonObjectRef.qml 2015-07-30 06:03:43 +0000
@@ -42,9 +42,15 @@
42 } else {42 } else {
43 console.info("Getting reference to python object via " + creationMethodName);43 console.info("Getting reference to python object via " + creationMethodName);
44 py.call(creationMethodName, args, function(result) {44 py.call(creationMethodName, args, function(result) {
45 object = result;45 if (!result) {
46 pythonObjectRef.creationMethodName = creationMethodName;46 var msg = "Object construction failed. " + creationMethodName + " did not return a valid object";
47 objectReady();47 console.error(msg);
48 throw msg;
49 } else {
50 object = result;
51 pythonObjectRef.creationMethodName = creationMethodName;
52 objectReady();
53 }
48 });54 });
49 }55 }
50 }56 }

Subscribers

People subscribed via source and target branches