Browse Source

[3899] Fixed spaces in error messages

Francis Dupont 10 years ago
parent
commit
f42d788520
2 changed files with 13 additions and 10 deletions
  1. 7 5
      src/lib/dhcp_ddns/ncr_io.cc
  2. 6 5
      src/lib/dhcp_ddns/ncr_msg.cc

+ 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());
     }
 }