Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8186

Incorrect exception handling fails to build on GCC 8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • qpid-cpp-1.38.0
    • qpid-cpp-1.39.0
    • C++ Broker
    • None
    • Gentoo x64, GCC 8.1

    Description

      [ 22%] Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/ssl/check.cpp.o
      /home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/sys/posix/SocketAddress.cpp: In member function ‘bool qpid::sys::SocketAddress::isComparable(const qpid::sys::SocketAddress&) const’:
      /home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/sys/posix/SocketAddress.cpp:208:18: error: catching polymorphic type ‘class qpid::Exception’ by value [-Werror=catch-value=]
      } catch (Exception)

      { ^~~~~~~~~ /home/chrisr/projects/qpid/qpid-cpp/source/src/qpid/sys/posix/SocketAddress.cpp:212:14: error: catching polymorphic type ‘class qpid::Exception’ by value [-Werror=catch-value=] }

      catch (Exception) {
      ^~~~~~~~~

       

       

      these "catch (Exception)" statements would better be const ref, which would also fix the build failure.

      Attachments

        Activity

          People

            jross Justin Ross
            crichardson Chris Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: