Merge lp:~albaguirre/location-service/ensure-noexcept into lp:location-service/trunk

Proposed by Alberto Aguirre
Status: Merged
Approved by: Thomas Voß
Approved revision: 111
Merged at revision: 111
Proposed branch: lp:~albaguirre/location-service/ensure-noexcept
Merge into: lp:location-service/trunk
Diff against target: 19 lines (+10/-1)
1 file modified
src/location_service/com/ubuntu/location/engine.cpp (+10/-1)
To merge this branch: bzr merge lp:~albaguirre/location-service/ensure-noexcept
Reviewer Review Type Date Requested Status
Thomas Voß (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+237133@code.launchpad.net

Commit message

Ensure Engine::for_each_provider fulfills the noexcept promise

Description of the change

Ensure Engine::for_each_provider fulfills the noexcept promise

Log an error if the enumerator lambda throws.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/location_service/com/ubuntu/location/engine.cpp'
2--- src/location_service/com/ubuntu/location/engine.cpp 2014-06-20 07:40:34 +0000
3+++ src/location_service/com/ubuntu/location/engine.cpp 2014-10-03 20:02:14 +0000
4@@ -136,5 +136,14 @@
5 {
6 std::lock_guard<std::mutex> lg(guard);
7 for (const auto& provider : providers)
8- enumerator(provider.first);
9+ {
10+ try
11+ {
12+ enumerator(provider.first);
13+ }
14+ catch(const std::exception& e)
15+ {
16+ VLOG(1) << e.what();
17+ }
18+ }
19 }

Subscribers

People subscribed via source and target branches