Merge lp:~stolowski/unity-lens-video/handle-cancellation-exception into lp:~unity-team/unity-lens-video/libunity7-compatible

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 123
Merged at revision: 123
Proposed branch: lp:~stolowski/unity-lens-video/handle-cancellation-exception
Merge into: lp:~unity-team/unity-lens-video/libunity7-compatible
Diff against target: 27 lines (+9/-2)
1 file modified
src/remote-scope.vala (+9/-2)
To merge this branch: bzr merge lp:~stolowski/unity-lens-video/handle-cancellation-exception
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+158404@code.launchpad.net

Commit message

Handle an exception when search is cancelled, so that search.finished() is always signalled.

Description of the change

Handle an exception when search is cancelled, so that search.finished() is always signalled.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/remote-scope.vala'
--- src/remote-scope.vala 2013-04-11 14:38:11 +0000
+++ src/remote-scope.vala 2013-04-11 15:37:35 +0000
@@ -353,7 +353,14 @@
353 {353 {
354 if (at_least_one_source_is_on (active_sources))354 if (at_least_one_source_is_on (active_sources))
355 {355 {
356 yield perform_search (search_string, search, active_sources, cancellable);356 try
357 {
358 yield perform_search (search_string, search, active_sources, cancellable);
359 }
360 catch (Error e)
361 {
362 warning ("Search interrupted: %s", e.message);
363 }
357 }364 }
358 }365 }
359366
@@ -381,7 +388,7 @@
381388
382 /* Query the server with the search string and the list of sources.389 /* Query the server with the search string and the list of sources.
383 */390 */
384 private async void perform_search (string search_string, DeprecatedScopeSearch search, Gee.ArrayList<string> active_sources, GLib.Cancellable? cancellable)391 private async void perform_search (string search_string, DeprecatedScopeSearch search, Gee.ArrayList<string> active_sources, GLib.Cancellable? cancellable) throws Error
385 {392 {
386 search.results_model.clear ();393 search.results_model.clear ();
387394

Subscribers

People subscribed via source and target branches