Mir

Merge lp:~alan-griffiths/mir/cherry-pick-fix-1641166-for-0-25 into lp:mir/0.25

Proposed by Alan Griffiths on 2016-11-13
Status: Merged
Approved by: Brandon Schaefer on 2016-11-14
Approved revision: 3816
Merged at revision: 3815
Proposed branch: lp:~alan-griffiths/mir/cherry-pick-fix-1641166-for-0-25
Merge into: lp:mir/0.25
Diff against target: 103 lines (+6/-45)
4 files modified
debian/changelog (+2/-0)
src/include/server/mir/frontend/unsupported_feature_exception.h (+0/-41)
src/server/frontend/protobuf_message_processor.cpp (+1/-2)
src/server/scene/unsupported_coordinate_translator.cpp (+3/-2)
To merge this branch: bzr merge lp:~alan-griffiths/mir/cherry-pick-fix-1641166-for-0-25
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve on 2016-11-14
Andreas Pokorny (community) Approve on 2016-11-14
Daniel van Vugt 2016-11-13 Needs Fixing on 2016-11-14
Review via email: mp+310720@code.launchpad.net

Commit message

Fix code to match the documentation of CoordinateTranslator - vis "It is acceptable ...[to] throw a std::runtime_error" (LP: #1641166)

To post a comment you must log in.
Daniel van Vugt (vanvugt) wrote :

I'm not familiar with the bug but we should probably land a changelog entry for the fix at the same time.

review: Needs Fixing
3816. By Alan Griffiths on 2016-11-14

Add changelog entry

Alan Griffiths (alan-griffiths) wrote :

> I'm not familiar with the bug but we should probably land a changelog entry
> for the fix at the same time.

Thanks you

Andreas Pokorny (andreas-pokorny) wrote :

ok...

review: Approve
Brandon Schaefer (brandontschaefer) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-11-09 05:52:05 +0000
+++ debian/changelog 2016-11-14 09:42:57 +0000
@@ -88,6 +88,8 @@
88 . mir_connection_create_spec_for_tooltip does not set aux_rect88 . mir_connection_create_spec_for_tooltip does not set aux_rect
89 (LP: #1632335)89 (LP: #1632335)
90 . VMware virtual connector recognized by Mir as "unknown" (LP: #1248072)90 . VMware virtual connector recognized by Mir as "unknown" (LP: #1248072)
91 . Fix code to match the documentation of CoordinateTranslator - vis "It is
92 acceptable ...[to] throw a std::runtime_error" (LP: #1641166)
91 . Test timeout MesaDisplayConfigurationTests.* (LP: #1613352)93 . Test timeout MesaDisplayConfigurationTests.* (LP: #1613352)
92 . Tests fail when built against lp:mir (LP: #1621917)94 . Tests fail when built against lp:mir (LP: #1621917)
93 . CI failure PointerConfinement.* (LP: #1606418)95 . CI failure PointerConfinement.* (LP: #1606418)
9496
=== removed file 'src/include/server/mir/frontend/unsupported_feature_exception.h'
--- src/include/server/mir/frontend/unsupported_feature_exception.h 2014-09-18 09:18:01 +0000
+++ src/include/server/mir/frontend/unsupported_feature_exception.h 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
1/*
2 * Copyright © 2014 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
17 */
18
19
20#ifndef MIR_FRONTEND_UNSUPPORTED_FEATURE_EXCEPTION_H_
21#define MIR_FRONTEND_UNSUPPORTED_FEATURE_EXCEPTION_H_
22
23#include <stdexcept>
24
25namespace mir
26{
27namespace frontend
28{
29class unsupported_feature : public std::runtime_error
30{
31public:
32 unsupported_feature()
33 : std::runtime_error{"Unsupported feature requested"}
34 {
35 }
36};
37}
38}
39
40
41#endif /* MIR_FRONTEND_UNSUPPORTED_FEATURE_EXCEPTION_H_ */
420
=== modified file 'src/server/frontend/protobuf_message_processor.cpp'
--- src/server/frontend/protobuf_message_processor.cpp 2016-10-12 06:03:15 +0000
+++ src/server/frontend/protobuf_message_processor.cpp 2016-11-14 09:42:57 +0000
@@ -22,7 +22,6 @@
22#include "mir/frontend/message_processor_report.h"22#include "mir/frontend/message_processor_report.h"
23#include "mir/frontend/protobuf_message_sender.h"23#include "mir/frontend/protobuf_message_sender.h"
24#include "mir/frontend/template_protobuf_message_processor.h"24#include "mir/frontend/template_protobuf_message_processor.h"
25#include "mir/frontend/unsupported_feature_exception.h"
26#include <mir/protobuf/display_server_debug.h>25#include <mir/protobuf/display_server_debug.h>
27#include "mir/client_visible_error.h"26#include "mir/client_visible_error.h"
2827
@@ -322,7 +321,7 @@
322 auto debug_interface = dynamic_cast<mir::protobuf::DisplayServerDebug*>(display_server.get());321 auto debug_interface = dynamic_cast<mir::protobuf::DisplayServerDebug*>(display_server.get());
323 invoke(this, debug_interface, &mir::protobuf::DisplayServerDebug::translate_surface_to_screen, invocation);322 invoke(this, debug_interface, &mir::protobuf::DisplayServerDebug::translate_surface_to_screen, invocation);
324 }323 }
325 catch (mir::frontend::unsupported_feature const&)324 catch (std::runtime_error const&)
326 {325 {
327 std::string message{"Server does not support the client debugging interface"};326 std::string message{"Server does not support the client debugging interface"};
328 invoke(this,327 invoke(this,
329328
=== modified file 'src/server/scene/unsupported_coordinate_translator.cpp'
--- src/server/scene/unsupported_coordinate_translator.cpp 2016-01-29 08:18:22 +0000
+++ src/server/scene/unsupported_coordinate_translator.cpp 2016-11-14 09:42:57 +0000
@@ -17,10 +17,11 @@
17 */17 */
1818
19#include "unsupported_coordinate_translator.h"19#include "unsupported_coordinate_translator.h"
20#include "mir/frontend/unsupported_feature_exception.h"
2120
22#include <boost/exception/all.hpp>21#include <boost/exception/all.hpp>
2322
23#include <stdexcept>
24
24namespace mg = mir::geometry;25namespace mg = mir::geometry;
25namespace mf = mir::frontend;26namespace mf = mir::frontend;
26namespace ms = mir::scene;27namespace ms = mir::scene;
@@ -29,5 +30,5 @@
29 std::shared_ptr<mf::Surface> /*surface*/,30 std::shared_ptr<mf::Surface> /*surface*/,
30 int32_t /*x*/, int32_t /*y*/)31 int32_t /*x*/, int32_t /*y*/)
31{32{
32 BOOST_THROW_EXCEPTION(mf::unsupported_feature());33 BOOST_THROW_EXCEPTION(std::runtime_error{"Unsupported feature requested"});
33}34}

Subscribers

People subscribed via source and target branches