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
1=== modified file 'checkbox-touch/components/CheckboxTouchApplication.qml'
2--- checkbox-touch/components/CheckboxTouchApplication.qml 2015-07-23 08:25:48 +0000
3+++ checkbox-touch/components/CheckboxTouchApplication.qml 2015-07-30 06:03:43 +0000
4@@ -51,6 +51,10 @@
5 sessionReady();
6 }, function(error) {
7 console.error("Unable to start session: " + error);
8+ ErrorLogic.showError(mainView,
9+ i18n.tr("Could not start a session. Reason:\n" + error),
10+ Qt.quit,
11+ i18n.tr("Quit"));
12 });
13 }
14 function resumeSession(rerunLastTest, providersDir, continuation) {
15
16=== modified file 'checkbox-touch/components/ErrorDialog.qml'
17--- checkbox-touch/components/ErrorDialog.qml 2014-11-11 05:46:42 +0000
18+++ checkbox-touch/components/ErrorDialog.qml 2015-07-30 06:03:43 +0000
19@@ -58,8 +58,6 @@
20
21 Dialog {
22 id: dlg
23- width: errorDialog.width
24- height: errorDialog.height
25 title: i18n.tr("Error encountered")
26
27 Label {
28
29=== modified file 'checkbox-touch/components/PythonObjectRef.qml'
30--- checkbox-touch/components/PythonObjectRef.qml 2015-05-27 06:51:12 +0000
31+++ checkbox-touch/components/PythonObjectRef.qml 2015-07-30 06:03:43 +0000
32@@ -42,9 +42,15 @@
33 } else {
34 console.info("Getting reference to python object via " + creationMethodName);
35 py.call(creationMethodName, args, function(result) {
36- object = result;
37- pythonObjectRef.creationMethodName = creationMethodName;
38- objectReady();
39+ if (!result) {
40+ var msg = "Object construction failed. " + creationMethodName + " did not return a valid object";
41+ console.error(msg);
42+ throw msg;
43+ } else {
44+ object = result;
45+ pythonObjectRef.creationMethodName = creationMethodName;
46+ objectReady();
47+ }
48 });
49 }
50 }

Subscribers

People subscribed via source and target branches