Merge lp:~ted/policykit-unity8/lp1579837-no-exception-on-timeout into lp:policykit-unity8

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 13
Merged at revision: 7
Proposed branch: lp:~ted/policykit-unity8/lp1579837-no-exception-on-timeout
Merge into: lp:policykit-unity8
Diff against target: 25 lines (+12/-3)
1 file modified
service/authentication.cpp (+12/-3)
To merge this branch: bzr merge lp:~ted/policykit-unity8/lp1579837-no-exception-on-timeout
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+294156@code.launchpad.net

Commit message

Replacing that U8 isn't responding with a recoverable error instead of crashing

Description of the change

Make it so that it doesn't look like our fault, but we still figure out issues :-)

To post a comment you must log in.
8. By Ted Gould

Forgot the packaging

9. By Ted Gould

Add in the gcrypt dep

10. By Ted Gould

Make it so that we depwait on old whoopsie instead of failing to build

11. By Ted Gould

Disable recoverable error until we can get whoopsie in a better state

12. By Ted Gould

Forgot to remove it from CMake

Revision history for this message
Charles Kerr (charlesk) wrote :

Adding in commented-out lines to debian/ is pretty clumsy.

IMO this would be better with the try-catch for now and adding the whoopsie pieces once the whoopsie FTBFS is resolved.

review: Needs Fixing
13. By Ted Gould

Remove the whoopsie code completely, for now

Revision history for this message
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'service/authentication.cpp'
2--- service/authentication.cpp 2016-04-25 20:57:22 +0000
3+++ service/authentication.cpp 2016-05-09 22:24:25 +0000
4@@ -230,9 +230,18 @@
5
6 g_debug("Showing Notification");
7
8- GError *error = nullptr;
9- notify_notification_show(notification.get(), &error);
10- check_error(error, "Unable to show notification");
11+ try
12+ {
13+ GError *error = nullptr;
14+ notify_notification_show(notification.get(), &error);
15+ check_error(error, "Unable to show notification");
16+ }
17+ catch (std::runtime_error &e)
18+ {
19+ /* We're gonna handle the error here by shutting things
20+ now and reporting a recoverable error */
21+ cancel();
22+ }
23 }
24
25 /** Hide a notification. This includes closing it if open and free'ing

Subscribers

People subscribed via source and target branches

to all changes: