diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-20 09:36:14 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-20 09:36:14 +0000 |
| commit | 694fb307aa7e582a55bce7e995bde3a4614b3b4f (patch) | |
| tree | 42bf3e703ebd706c9ebdd62bca59396f2d67a790 /src/AbstractCommand.cc | |
| parent | 580098eb4929a3bdbf424af18da361259ef2efe5 (diff) | |
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced StringFormat with fmt
Diffstat (limited to 'src/AbstractCommand.cc')
| -rw-r--r-- | src/AbstractCommand.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 1c11efc2..3b25fa5b 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -54,7 +54,6 @@ #include "Socket.h" #include "message.h" #include "prefs.h" -#include "StringFormat.h" #include "fmt.h" #include "ServerStat.h" #include "RequestGroupMan.h" @@ -225,9 +224,8 @@ bool AbstractCommand::execute() { } return executeInternal(); } else if(errorEventEnabled()) { - throw DL_RETRY_EX - (StringFormat(MSG_NETWORK_PROBLEM, - socket_->getSocketError().c_str()).str()); + throw DL_RETRY_EX(fmt(MSG_NETWORK_PROBLEM, + socket_->getSocketError().c_str())); } else { if(checkPoint_.difference(global::wallclock) >= timeout_) { // timeout triggers ServerStat error state. @@ -653,10 +651,10 @@ bool AbstractCommand::asyncResolveHostname() (req_->getHost(), req_->getProtocol())->setError(); } throw DL_ABORT_EX - (StringFormat(MSG_NAME_RESOLUTION_FAILED, + (fmt(MSG_NAME_RESOLUTION_FAILED, util::itos(getCuid()).c_str(), asyncNameResolver_->getHostname().c_str(), - asyncNameResolver_->getError().c_str()).str()); + asyncNameResolver_->getError().c_str())); default: return false; } @@ -780,7 +778,7 @@ bool AbstractCommand::checkIfConnectionEstablished (req_->getHost(), req_->getProtocol())->setError(); } throw DL_RETRY_EX - (StringFormat(MSG_ESTABLISHING_CONNECTION_FAILED, error.c_str()).str()); + (fmt(MSG_ESTABLISHING_CONNECTION_FAILED, error.c_str())); } } return true; |
