Browse Source

[1956] Catch exceptions as const reference.

Marcin Siodelski 13 years ago
parent
commit
25af754fb6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/tools/perfdhcp/perf_pkt6.cc

+ 2 - 2
tests/tools/perfdhcp/perf_pkt6.cc

@@ -75,7 +75,7 @@ PerfPkt6::rawPack() {
         // but still some options have to be updated if client
         // but still some options have to be updated if client
         // specified them along with their offsets in the buffer.
         // specified them along with their offsets in the buffer.
         rawPackOptions();
         rawPackOptions();
-    } catch (isc::BadValue& e) {
+    } catch (const isc::BadValue& e) {
         cout << "Building packet failed: " << e.what() << endl;
         cout << "Building packet failed: " << e.what() << endl;
         return (false);
         return (false);
     }
     }
@@ -102,7 +102,7 @@ PerfPkt6::rawUnpack() {
     msg_type_ = data_[0];
     msg_type_ = data_[0];
     try {
     try {
         rawUnpackOptions();
         rawUnpackOptions();
-    } catch (isc::BadValue& e) {
+    } catch (const isc::BadValue& e) {
         cout << "Packet parsing failed: " << e.what() << endl;
         cout << "Packet parsing failed: " << e.what() << endl;
         return (false);
         return (false);
     }
     }