summaryrefslogtreecommitdiff
path: root/src/DHTRoutingTableSerializer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-09 14:43:47 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-09 14:43:47 +0000
commit228b4c50d757b80efe493728a658ae145eaf67ef (patch)
treeaefd6e605ca52f6e4125f6e25d405e56a1ef681a /src/DHTRoutingTableSerializer.cc
parent02f725cab581063a0570402032f0b328e6f3a8a3 (diff)
2010-11-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Capture errno right after system/library call to avoid it to get overwritten. Use util::safeStrerror instead of strerror directly because strerror might return NULL. We don't check errno for std::fstream anymore. * src/AbstractDiskWriter.cc * src/CookieStorage.cc * src/DHTAutoSaveCommand.cc * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableSerializer.cc * src/DefaultBtProgressInfoFile.cc * src/EpollEventPoll.cc * src/IteratableChunkChecksumValidator.cc * src/KqueueEventPoll.cc * src/Logger.cc * src/MessageDigestHelper.cc * src/PortEventPoll.cc * src/SelectEventPoll.cc * src/SocketCore.cc * src/message.h * src/util.cc * src/util.h
Diffstat (limited to 'src/DHTRoutingTableSerializer.cc')
-rw-r--r--src/DHTRoutingTableSerializer.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/DHTRoutingTableSerializer.cc b/src/DHTRoutingTableSerializer.cc
index 2228e422..aa995fc7 100644
--- a/src/DHTRoutingTableSerializer.cc
+++ b/src/DHTRoutingTableSerializer.cc
@@ -34,7 +34,6 @@
/* copyright --> */
#include "DHTRoutingTableSerializer.h"
-#include <cerrno>
#include <cstring>
#include <ostream>
@@ -130,9 +129,7 @@ void DHTRoutingTableSerializer::serialize(std::ostream& o)
o.flush();
if(!o) {
- throw DL_ABORT_EX
- (StringFormat("Failed to save DHT routing table. cause:%s",
- strerror(errno)).str());
+ throw DL_ABORT_EX("Failed to save DHT routing table.");
}
}