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
=== 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-11 17:55:37 +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-11 17:55:37 +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