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

Incorrect exception handling fails to build on GCC 8

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: qpid-cpp-1.38.0
    • Fix Version/s: qpid-cpp-1.39.0
    • Component/s: C++ Broker
    • Labels:
      None
    • Environment:

      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

          Issue Links

            Activity

              People

              • Assignee:
                justi9 Justin Ross
                Reporter:
                crichardson Chris Richardson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: