Mir

Merge lp:~alan-griffiths/mir/fix-1641166 into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Andreas Pokorny
Approved revision: no longer in the source branch.
Merged at revision: 3819
Proposed branch: lp:~alan-griffiths/mir/fix-1641166
Merge into: lp:mir
Diff against target: 90 lines (+4/-45)
3 files modified
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/fix-1641166
Reviewer Review Type Date Requested Status
Andreas Pokorny (community) Approve
Mir CI Bot continuous-integration Approve
Stephen M. Webb (community) Approve
Review via email: mp+310676@code.launchpad.net

Commit message

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

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Simpler code is better, but see inline comment.

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Simpler code is better, but see inline comment.

fixed

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3819
https://mir-jenkins.ubuntu.com/job/mir-ci/2154/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/2790/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2855
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2847
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2847
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2847
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2819/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2819
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2819/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2819
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2819/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2819
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2819/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2819
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2819/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2819
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2819/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2154/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3820
https://mir-jenkins.ubuntu.com/job/mir-ci/2155/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/2791
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/2856
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2848
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2848
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2848
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2820
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/2820/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2820
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/2820/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2820
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/2820/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2820
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/2820/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2820
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/2820/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2820
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/2820/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2155/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

ok

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'src/include/server/mir/frontend/unsupported_feature_exception.h'
2--- src/include/server/mir/frontend/unsupported_feature_exception.h 2014-09-18 09:18:01 +0000
3+++ src/include/server/mir/frontend/unsupported_feature_exception.h 1970-01-01 00:00:00 +0000
4@@ -1,41 +0,0 @@
5-/*
6- * Copyright © 2014 Canonical Ltd.
7- *
8- * This program is free software: you can redistribute it and/or modify it
9- * under the terms of the GNU General Public License version 3,
10- * as published by the Free Software Foundation.
11- *
12- * This program is distributed in the hope that it will be useful,
13- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15- * GNU General Public License for more details.
16- *
17- * You should have received a copy of the GNU General Public License
18- * along with this program. If not, see <http://www.gnu.org/licenses/>.
19- *
20- * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
21- */
22-
23-
24-#ifndef MIR_FRONTEND_UNSUPPORTED_FEATURE_EXCEPTION_H_
25-#define MIR_FRONTEND_UNSUPPORTED_FEATURE_EXCEPTION_H_
26-
27-#include <stdexcept>
28-
29-namespace mir
30-{
31-namespace frontend
32-{
33-class unsupported_feature : public std::runtime_error
34-{
35-public:
36- unsupported_feature()
37- : std::runtime_error{"Unsupported feature requested"}
38- {
39- }
40-};
41-}
42-}
43-
44-
45-#endif /* MIR_FRONTEND_UNSUPPORTED_FEATURE_EXCEPTION_H_ */
46
47=== modified file 'src/server/frontend/protobuf_message_processor.cpp'
48--- src/server/frontend/protobuf_message_processor.cpp 2016-10-12 06:03:15 +0000
49+++ src/server/frontend/protobuf_message_processor.cpp 2016-11-11 17:55:37 +0000
50@@ -22,7 +22,6 @@
51 #include "mir/frontend/message_processor_report.h"
52 #include "mir/frontend/protobuf_message_sender.h"
53 #include "mir/frontend/template_protobuf_message_processor.h"
54-#include "mir/frontend/unsupported_feature_exception.h"
55 #include <mir/protobuf/display_server_debug.h>
56 #include "mir/client_visible_error.h"
57
58@@ -322,7 +321,7 @@
59 auto debug_interface = dynamic_cast<mir::protobuf::DisplayServerDebug*>(display_server.get());
60 invoke(this, debug_interface, &mir::protobuf::DisplayServerDebug::translate_surface_to_screen, invocation);
61 }
62- catch (mir::frontend::unsupported_feature const&)
63+ catch (std::runtime_error const&)
64 {
65 std::string message{"Server does not support the client debugging interface"};
66 invoke(this,
67
68=== modified file 'src/server/scene/unsupported_coordinate_translator.cpp'
69--- src/server/scene/unsupported_coordinate_translator.cpp 2016-01-29 08:18:22 +0000
70+++ src/server/scene/unsupported_coordinate_translator.cpp 2016-11-11 17:55:37 +0000
71@@ -17,10 +17,11 @@
72 */
73
74 #include "unsupported_coordinate_translator.h"
75-#include "mir/frontend/unsupported_feature_exception.h"
76
77 #include <boost/exception/all.hpp>
78
79+#include <stdexcept>
80+
81 namespace mg = mir::geometry;
82 namespace mf = mir::frontend;
83 namespace ms = mir::scene;
84@@ -29,5 +30,5 @@
85 std::shared_ptr<mf::Surface> /*surface*/,
86 int32_t /*x*/, int32_t /*y*/)
87 {
88- BOOST_THROW_EXCEPTION(mf::unsupported_feature());
89+ BOOST_THROW_EXCEPTION(std::runtime_error{"Unsupported feature requested"});
90 }

Subscribers

People subscribed via source and target branches