Browse Source

[master] Merged trac3899 (error message fixes)

Francis Dupont 9 years ago
parent
commit
d2c5f1f396

+ 2 - 2
src/lib/dhcp/duid.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -76,7 +76,7 @@ DUID::decode(const std::string& text) {
             // allowed for client identifier.
             if (split_text[i].empty()) {
                 isc_throw(isc::BadValue, "invalid identifier '"
-                          << text << "': " << " tokens must be"
+                          << text << "': tokens must be"
                           " separated with a single colon");
             } else if (split_text[i].size() > 2) {
                 isc_throw(isc::BadValue, "invalid identifier '"

+ 5 - 5
src/lib/dhcp/iface_mgr_error_handler.h

@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -40,12 +40,12 @@
 /// @param stream stream object holding an error string.
 #define IFACEMGR_ERROR(ex_type, handler, stream) \
 { \
-    std::ostringstream oss__; \
-    oss__ << stream; \
+    std::ostringstream ieoss__; \
+    ieoss__ << stream; \
     if (handler) { \
-        handler(oss__.str()); \
+        handler(ieoss__.str()); \
     } else { \
-        isc_throw(ex_type, oss__); \
+        isc_throw(ex_type, ieoss__.str()); \
     } \
 } \
 

+ 3 - 3
src/lib/dhcp/option4_client_fqdn.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -384,9 +384,9 @@ Option4ClientFqdn::setFlag(const uint8_t flag, const bool set_flag) {
     // multiple flags concurrently.
     if (((flag & ~FLAG_MASK) != 0) || (flag == 0)) {
         isc_throw(InvalidOption4FqdnFlags, "invalid DHCPv4 Client FQDN"
-                  << " Option flag " << std::hex
+                  << " Option flag 0x" << std::hex
                   << static_cast<int>(flag) << std::dec
-                  << "is being set. Expected combination of E, N, S and O");
+                  << " is being set. Expected combination of E, N, S and O");
     }
 
     // Copy the current flags into local variable. That way we will be able

+ 5 - 5
src/lib/dhcp/option6_client_fqdn.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -250,7 +250,7 @@ Option6ClientFqdnImpl::parseWireData(OptionBufferConstIter first,
             try {
                 domain_name_.reset(new isc::dns::Name(name_buf, true));
             } catch (const Exception& ex) {
-                isc_throw(InvalidOption6FqdnDomainName, "failed to parse"
+                isc_throw(InvalidOption6FqdnDomainName, "failed to parse "
                           "partial domain-name from wire format");
             }
             // Terminating zero was missing, so set the domain-name type
@@ -265,7 +265,7 @@ Option6ClientFqdnImpl::parseWireData(OptionBufferConstIter first,
             try {
                 domain_name_.reset(new isc::dns::Name(name_buf, true));
             } catch (const Exception& ex) {
-                isc_throw(InvalidOption6FqdnDomainName, "failed to parse"
+                isc_throw(InvalidOption6FqdnDomainName, "failed to parse "
                           "fully qualified domain-name from wire format");
             }
             // Set the domain-type to fully qualified domain name.
@@ -332,9 +332,9 @@ Option6ClientFqdn::setFlag(const uint8_t flag, const bool set_flag) {
     // checked here so it will work.
     if (((flag & ~FLAG_MASK) != 0) || (flag == 0)) {
         isc_throw(InvalidOption6FqdnFlags, "invalid DHCPv6 Client FQDN"
-                  << " Option flag " << std::hex
+                  << " Option flag 0x" << std::hex
                   << static_cast<int>(flag) << std::dec
-                  << "is being set. Expected: N, S or O");
+                  << " is being set. Expected: N, S or O");
     }
 
     // Copy the current flags into local variable. That way we will be able

+ 2 - 1
src/lib/dhcp/option6_iaprefix.cc

@@ -39,7 +39,8 @@ Option6IAPrefix::Option6IAPrefix(uint16_t type, const isc::asiolink::IOAddress&
     setEncapsulatedSpace("dhcp6");
     // Option6IAAddr will check if prefix is IPv6 and will throw if it is not
     if (prefix_len > 128) {
-        isc_throw(BadValue, prefix_len << " is not a valid prefix length. "
+        isc_throw(BadValue, static_cast<unsigned>(prefix_len)
+                  << " is not a valid prefix length. "
                   << "Allowed range is 0..128");
     }
 }

+ 2 - 2
src/lib/dhcp/option_custom.cc

@@ -327,7 +327,7 @@ OptionCustom::dataFieldToText(const OptionDataType data_type,
         text << (readBoolean(index) ? "true" : "false");
         break;
     case OPT_INT8_TYPE:
-        text << readInteger<int8_t>(index);
+        text << static_cast<int>(readInteger<int8_t>(index));
         break;
     case OPT_INT16_TYPE:
         text << readInteger<int16_t>(index);
@@ -336,7 +336,7 @@ OptionCustom::dataFieldToText(const OptionDataType data_type,
         text << readInteger<int32_t>(index);
         break;
     case OPT_UINT8_TYPE:
-        text << readInteger<uint8_t>(index);
+        text << static_cast<unsigned>(readInteger<uint8_t>(index));
         break;
     case OPT_UINT16_TYPE:
         text << readInteger<uint16_t>(index);

+ 1 - 1
src/lib/dhcp/tests/option6_iaprefix_unittest.cc

@@ -252,7 +252,7 @@ TEST_F(Option6IAPrefixTest, negative) {
                  BadValue);
 
     // Prefix length can't be larger than 128
-    EXPECT_THROW(Option6IAPrefix(12345, IOAddress("192.0.2.1"),
+    EXPECT_THROW(Option6IAPrefix(12345, IOAddress("2001:db8:1::"),
                                  255, 1000, 2000),
                  BadValue);
 }

+ 1 - 1
src/lib/dhcp/tests/option_custom_unittest.cc

@@ -477,7 +477,7 @@ TEST_F(OptionCustomTest, ipv6AddressData) {
     // Check that option is not created if the provided buffer is
     // too short (use 15 bytes instead of 16).
     EXPECT_THROW(
-        option.reset(new OptionCustom(opt_def, Option::V4, buf.begin(),
+        option.reset(new OptionCustom(opt_def, Option::V6, buf.begin(),
                                       buf.begin() + 15)),
         isc::OutOfRange
     );

+ 7 - 5
src/lib/dhcp_ddns/ncr_io.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -30,7 +30,8 @@ NameChangeProtocol stringToNcrProtocol(const std::string& protocol_str) {
         return (NCR_TCP);
     }
 
-    isc_throw(BadValue, "Invalid NameChangeRequest protocol:" << protocol_str);
+    isc_throw(BadValue,
+              "Invalid NameChangeRequest protocol: " << protocol_str);
 }
 
 std::string ncrProtocolToString(NameChangeProtocol protocol) {
@@ -69,7 +70,7 @@ NameChangeListener::startListening(isc::asiolink::IOService& io_service) {
         open(io_service);
     } catch (const isc::Exception& ex) {
         stopListening();
-        isc_throw(NcrListenerOpenError, "Open failed:" << ex.what());
+        isc_throw(NcrListenerOpenError, "Open failed: " << ex.what());
     }
 
     // Set our status to listening.
@@ -80,7 +81,7 @@ NameChangeListener::startListening(isc::asiolink::IOService& io_service) {
         receiveNext();
     } catch (const isc::Exception& ex) {
         stopListening();
-        isc_throw(NcrListenerReceiveError, "doReceive failed:" << ex.what());
+        isc_throw(NcrListenerReceiveError, "doReceive failed: " << ex.what());
     }
 }
 
@@ -236,7 +237,8 @@ NameChangeSender::sendRequest(NameChangeRequestPtr& ncr) {
     }
 
     if (send_queue_.size() >= send_queue_max_) {
-        isc_throw(NcrSenderQueueFull, "send queue has reached maximum capacity:"
+        isc_throw(NcrSenderQueueFull,
+                  "send queue has reached maximum capacity: "
                   << send_queue_max_ );
     }
 

+ 6 - 5
src/lib/dhcp_ddns/ncr_msg.cc

@@ -34,7 +34,7 @@ NameChangeFormat stringToNcrFormat(const std::string& fmt_str) {
         return FMT_JSON;
     }
 
-    isc_throw(BadValue, "Invalid NameChangeRequest format:" << fmt_str);
+    isc_throw(BadValue, "Invalid NameChangeRequest format: " << fmt_str);
 }
 
 
@@ -93,7 +93,7 @@ D2Dhcid::fromStr(const std::string& data) {
     try {
         isc::util::encode::decodeHex(data, bytes_);
     } catch (const isc::Exception& ex) {
-        isc_throw(NcrMessageError, "Invalid data in Dhcid:" << ex.what());
+        isc_throw(NcrMessageError, "Invalid data in Dhcid: " << ex.what());
     }
 }
 
@@ -456,7 +456,7 @@ NameChangeRequest::setForwardChange(isc::data::ConstElementPtr element) {
     } catch (isc::data::TypeError& ex) {
         // We expect a boolean Element type, don't have one.
         isc_throw(NcrMessageError,
-                  "Wrong data type for forward_change :" << ex.what());
+                  "Wrong data type for forward_change: " << ex.what());
     }
 
     // Good to go, make the assignment.
@@ -477,7 +477,7 @@ NameChangeRequest::setReverseChange(isc::data::ConstElementPtr element) {
     } catch (isc::data::TypeError& ex) {
         // We expect a boolean Element type, don't have one.
         isc_throw(NcrMessageError,
-                  "Wrong data type for reverse_change :" << ex.what());
+                  "Wrong data type for reverse_change: " << ex.what());
     }
 
     // Good to go, make the assignment.
@@ -497,7 +497,8 @@ NameChangeRequest::setFqdn(const std::string& value) {
         fqdn_ = tmp.toText();
     } catch (const std::exception& ex) {
         isc_throw(NcrMessageError,
-                  "Invalid FQDN value: " << value << ", reason:" << ex.what());
+                  "Invalid FQDN value: " << value << ", reason: "
+                  << ex.what());
     }
 }
 

+ 3 - 3
src/lib/dhcpsrv/addr_utilities.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012,2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -199,8 +199,8 @@ isc::asiolink::IOAddress lastAddrInPrefix(const isc::asiolink::IOAddress& prefix
 
 isc::asiolink::IOAddress getNetmask4(uint8_t len) {
     if (len > 32) {
-        isc_throw(BadValue, "Invalid netmask size " << len << ", allowed range "
-                  "is 0..32");
+      isc_throw(BadValue, "Invalid netmask size "
+                << static_cast<unsigned>(len) << ", allowed range is 0..32");
     }
     uint32_t x = ~bitMask4[len];
 

+ 1 - 1
src/lib/dhcpsrv/parsers/dhcp_parsers.cc

@@ -890,7 +890,7 @@ RelayInfoParser::build(ConstElementPtr relay_info) {
     if ( (ip->isV4() && family_ != Option::V4) ||
          (ip->isV6() && family_ != Option::V6) ) {
         isc_throw(DhcpConfigError, "ip-address field " << ip->toText()
-                  << "does not have IP address of expected family type: "
+                  << " does not have IP address of expected family type: "
                   << (family_ == Option::V4 ? "IPv4" : "IPv6")
                   << " (" << string_values_->getPosition("ip-address") << ")");
     }

+ 1 - 1
src/lib/dhcpsrv/pgsql_lease_mgr.cc

@@ -662,7 +662,7 @@ public:
 
         } catch (const std::exception& ex) {
             isc_throw(DbOperationError,
-                      "Could not create bind array for Lease4: "
+                      "Could not create bind array from Lease4: "
                       << lease_->addr_.toText() << ", reason: " << ex.what());
         }
     }

+ 3 - 3
src/lib/dhcpsrv/pool.cc

@@ -114,7 +114,7 @@ Pool6::Pool6(Lease::Type type, const isc::asiolink::IOAddress& first,
     // parameters are for IA and TA only. There is another dedicated
     // constructor for that (it uses prefix/length)
     if ((type != Lease::TYPE_NA) && (type != Lease::TYPE_TA)) {
-        isc_throw(BadValue, "Invalid Pool6 type specified:"
+        isc_throw(BadValue, "Invalid Pool6 type specified: "
                   << static_cast<int>(type));
     }
 
@@ -135,7 +135,7 @@ Pool6::Pool6(Lease::Type type, const isc::asiolink::IOAddress& prefix,
 
     // check if the prefix length is sane
     if (prefix_len == 0 || prefix_len > 128) {
-        isc_throw(BadValue, "Invalid prefix length: " << prefix_len);
+        isc_throw(BadValue, "Invalid prefix length: " << static_cast<unsigned>(prefix_len));
     }
 
     if (prefix_len > delegated_len) {
@@ -146,7 +146,7 @@ Pool6::Pool6(Lease::Type type, const isc::asiolink::IOAddress& prefix,
 
     if ( ( (type == Lease::TYPE_NA) || (type == Lease::TYPE_TA)) &&
          (delegated_len != 128)) {
-        isc_throw(BadValue, "For IA or TA pools, delegated prefix length must "
+        isc_throw(BadValue, "For IA or TA pools, delegated prefix length must"
                   << " be 128.");
     }
 

+ 4 - 4
src/lib/dhcpsrv/subnet.cc

@@ -262,6 +262,9 @@ const PoolPtr Subnet::getPool(Lease::Type type, const isc::asiolink::IOAddress&
 
 void
 Subnet::addPool(const PoolPtr& pool) {
+    // check if the type is valid (and throw if it isn't)
+    checkType(pool->getType());
+
     // Check that the pool is in range with a subnet only if this is
     // not a pool of IPv6 prefixes. The IPv6 prefixes delegated for
     // the particular subnet don't need to match the prefix of the
@@ -272,7 +275,7 @@ Subnet::addPool(const PoolPtr& pool) {
                       << Lease::typeToText(pool->getType())
                       << ", with the following address range: "
                       << pool->getFirstAddress() << "-"
-                      << pool->getLastAddress() << " does not match "
+                      << pool->getLastAddress() << " does not match"
                       << " the prefix of a subnet: "
                       << prefix_ << "/" << static_cast<int>(prefix_len_)
                       << " to which it is being added");
@@ -281,9 +284,6 @@ Subnet::addPool(const PoolPtr& pool) {
 
     /// @todo: Check that pools do not overlap
 
-    // check if the type is valid (and throw if it isn't)
-    checkType(pool->getType());
-
     // Add the pool to the appropriate pools collection
     getPoolsWritable(pool->getType()).push_back(pool);
 }

+ 1 - 1
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc

@@ -96,7 +96,7 @@ GenericLeaseMgrTest::initializeLease4(std::string address) {
         lease->fqdn_fwd_ = false;
         lease->hostname_ = "myhost.example.com.";
 
-        } else if (address == straddress4_[1]) {
+    } else if (address == straddress4_[1]) {
         lease->hwaddr_.reset(new HWAddr(vector<uint8_t>(6, 0x19), HTYPE_ETHER));
         lease->client_id_ = ClientIdPtr(
             new ClientId(vector<uint8_t>(8, 0x53)));

+ 1 - 0
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

@@ -276,6 +276,7 @@ TEST_F(MemfileLeaseMgrTest, constructor) {
     EXPECT_THROW(lease_mgr.reset(new Memfile_LeaseMgr(pmap)), isc::BadValue);
 
     // The lfc-interval must be an integer.
+    pmap["persist"] = "true";
     pmap["lfc-interval"] = "bogus";
     EXPECT_THROW(lease_mgr.reset(new Memfile_LeaseMgr(pmap)), isc::BadValue);
 }

+ 5 - 5
src/lib/dhcpsrv/tests/pool_unittest.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2013,2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2013, 2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -39,15 +39,15 @@ TEST(Pool4Test, constructor_first_last) {
     EXPECT_EQ(IOAddress("192.0.2.255"), pool1.getLastAddress());
 
     // This is Pool4, IPv6 addresses do not belong here
-    EXPECT_THROW(Pool6(Lease::TYPE_NA, IOAddress("2001:db8::1"),
+    EXPECT_THROW(Pool4(IOAddress("2001:db8::1"),
                        IOAddress("192.168.0.5")), BadValue);
-    EXPECT_THROW(Pool6(Lease::TYPE_NA, IOAddress("192.168.0.2"),
+    EXPECT_THROW(Pool4(IOAddress("192.168.0.2"),
                        IOAddress("2001:db8::1")), BadValue);
 
     // Should throw. Range should be 192.0.2.1-192.0.2.2, not
     // the other way around.
-    EXPECT_THROW(Pool6(Lease::TYPE_NA, IOAddress("192.0.2.2"),
-                       IOAddress("192.0.2.1")), BadValue);
+    EXPECT_THROW(Pool4(IOAddress("192.0.2.2"), IOAddress("192.0.2.1")),
+                 BadValue);
 }
 
 TEST(Pool4Test, constructor_prefix_len) {

+ 6 - 5
src/lib/dns/labelsequence.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2014  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -393,14 +393,15 @@ LabelSequence::extend(const LabelSequence& labels,
         isc_throw(BadValue,
                   "extend() called with unrelated buffer");
     }
-    if (data_pos + data_len > Name::MAX_WIRE) {
-        isc_throw(BadValue,
-                  "extend() would exceed maximum wire length");
-    }
+    // Check MAX_LABELS before MAX_WIRE or it will be never reached
     if (label_count + append_label_count > Name::MAX_LABELS) {
         isc_throw(BadValue,
                   "extend() would exceed maximum number of labels");
     }
+    if (data_pos + data_len > Name::MAX_WIRE) {
+        isc_throw(BadValue,
+                  "extend() would exceed maximum wire length");
+    }
 
     // All seems to be reasonably ok, let's proceed.
     std::memmove(&buf[data_pos], data, data_len);

+ 5 - 3
src/lib/dns/message.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -398,7 +398,7 @@ Message::getHeaderFlag(const HeaderFlag flag) const {
     if (flag == 0 || (flag & ~HEADERFLAG_MASK) != 0) {
         isc_throw(InvalidParameter,
                   "Message::getHeaderFlag:: Invalid flag is specified: " <<
-                  flag);
+                  "0x" << std::hex << flag);
     }
     return ((impl_->flags_ & flag) != 0);
 }
@@ -412,7 +412,7 @@ Message::setHeaderFlag(const HeaderFlag flag, const bool on) {
     if (flag == 0 || (flag & ~HEADERFLAG_MASK) != 0) {
         isc_throw(InvalidParameter,
                   "Message::getHeaderFlag:: Invalid flag is specified: " <<
-                  flag);
+                  "0x" << std::hex << flag);
     }
     if (on) {
         impl_->flags_ |= flag;
@@ -854,6 +854,8 @@ MessageImpl::addTSIG(Message::Section section, unsigned int count,
     if (count != counts_[section] - 1) {
         isc_throw(DNSMessageFORMERR, "TSIG RR is not the last record");
     }
+    // This check will never fail as the multiple TSIG RR case is
+    // caught before by the not the last record check...
     if (tsig_rr_) {
         isc_throw(DNSMessageFORMERR, "multiple TSIG RRs found");
     }

+ 3 - 2
src/lib/dns/messagerenderer.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2009,2015  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -378,7 +378,8 @@ AbstractMessageRenderer::setBuffer(OutputBuffer* buffer) {
     if (buffer != NULL && buffer_->getLength() != 0) {
         isc_throw(isc::InvalidParameter,
                   "MessageRenderer buffer cannot be set when in use");
-    } if (buffer == NULL && buffer_ == &local_buffer_) {
+    }
+    if (buffer == NULL && buffer_ == &local_buffer_) {
         isc_throw(isc::InvalidParameter,
                   "Default MessageRenderer buffer cannot be reset");
     }

+ 3 - 2
src/lib/dns/opcode.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -50,7 +50,8 @@ const uint8_t MAX_OPCODE = 15;
 Opcode::Opcode(const uint8_t code) : code_(static_cast<CodeValue>(code)) {
     if (code > MAX_OPCODE) {
         isc_throw(OutOfRange,
-                  "DNS Opcode is too large to construct: " << code);
+                  "DNS Opcode is too large to construct: "
+		  << static_cast<unsigned>(code));
     }
 }
 

+ 2 - 2
src/lib/dns/rdata/generic/detail/txt_like.h

@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -126,7 +126,7 @@ private:
         lexer.ungetToken();
 
         if (string_list_.empty()) {
-            isc_throw(InvalidRdataText, "Failed to construct" <<
+            isc_throw(InvalidRdataText, "Failed to construct " <<
                       RRType(typeCode) << " RDATA: empty input");
         }
     }

+ 2 - 2
src/lib/dns/rdatafields.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -175,7 +175,7 @@ RdataFields::RdataFields(const void* fields, const unsigned int fields_length,
     }
     if (total_length != data_length_) {
         isc_throw(InvalidParameter,
-                  "Inconsistent parameters for RdataFields; "
+                  "Inconsistent parameters for RdataFields: "
                   "fields len: " << total_length <<
                   " data len: " << data_length_);
     }

+ 2 - 2
src/lib/dns/tsigrecord.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -64,7 +64,7 @@ castToTSIGRdata(const rdata::Rdata& rdata) {
     if (!tsig_rdata) {
         isc_throw(DNSMessageFORMERR,
                   "TSIG record is being constructed from "
-                  "incompatible RDATA:" << rdata.toText());
+                  "incompatible RDATA: " << rdata.toText());
     }
     return (*tsig_rdata);
 }

+ 2 - 2
src/lib/util/encode/base_n.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -365,7 +365,7 @@ BaseNTransformer<BitsPerChunk, BaseZeroCode, Encoder, Decoder>::decode(
     // 0      7 (bits)
     // The following check rejects this type of invalid encoding.
     if (padbits > BitsPerChunk * (padchars + 1)) {
-        isc_throw(BadValue, "Invalid " << algorithm << "padding: " << input);
+        isc_throw(BadValue, "Invalid " << algorithm << " padding: " << input);
     }
 
     // convert the number of bits in bytes for convenience.

+ 2 - 2
src/lib/util/time_utilities.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -150,7 +150,7 @@ checkRange(const int min, const int max, const int value,
     if ((value >= min) && (value <= max)) {
         return;
     }
-    isc_throw(InvalidTime, "Invalid " << valname << "value: " << value);
+    isc_throw(InvalidTime, "Invalid " << valname << " value: " << value);
 }
 }