Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15927

Catch polymorphic type by reference

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Need to catch polymorphic exception types by reference in order to realize the polymorphic usage, if any. Otherwise, the functionality of the caught object is restricted to only that of the base class.

      Also, the following warning gets reported since it's currently caught by value -

      [WARNING] /home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:138:22: warning: catching polymorphic type 'const class hdfs::uri_parse_error' by value [-Wcatch-value=]
      [WARNING] /home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:151:27: warning: catching polymorphic type 'struct hdfs::ha_parse_error' by value [-Wcatch-value=]
      

      Attachments

        Issue Links

          Activity

            People

              gaurava Gautham Banasandra
              gaurava Gautham Banasandra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h