2009-05-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Defined MSG_CANNOT_PARSE_XML_RPC_REQUEST
	* src/ExpatXmlRpcRequestProcessor.cc
	* src/Xml2XmlRpcRequestProcessor.cc
	* src/message.h
pull/1/head
Tatsuhiro Tsujikawa 2009-05-15 08:56:34 +00:00
parent 389866621f
commit ee75995198
4 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2009-05-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Defined MSG_CANNOT_PARSE_XML_RPC_REQUEST
* src/ExpatXmlRpcRequestProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/message.h
2009-05-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Defined const BDEs to avoid duplicate instantiation.

View File

@ -41,6 +41,7 @@
#include "XmlRpcRequestParserStateMachine.h"
#include "Util.h"
#include "DlAbortEx.h"
#include "message.h"
namespace aria2 {
@ -111,7 +112,7 @@ XmlRpcRequestProcessor::parseMemory(const std::string& xml)
XML_ParserFree(parser);
if(r == XML_STATUS_ERROR) {
throw DlAbortEx("Failed to parse xml-rpc request.");
throw DlAbortEx(MSG_CANNOT_PARSE_XML_RPC_REQUEST);
}
return XmlRpcRequest(_stm->getMethodName(), _stm->getCurrentFrameValue());
}

View File

@ -41,6 +41,7 @@
#include "XmlRpcRequestParserStateMachine.h"
#include "Util.h"
#include "DlAbortEx.h"
#include "message.h"
namespace aria2 {
@ -140,7 +141,7 @@ XmlRpcRequestProcessor::parseMemory(const std::string& xml)
int r = xmlSAXUserParseMemory(&mySAXHandler, sessionData.get(),
xml.data(), xml.size());
if(r != 0) {
throw DlAbortEx("Failed to parse xml-rpc request.");
throw DlAbortEx(MSG_CANNOT_PARSE_XML_RPC_REQUEST);
}
return XmlRpcRequest(_stm->getMethodName(), _stm->getCurrentFrameValue());
}

View File

@ -171,6 +171,7 @@
#define MSG_NOT_TORRENT_METALINK _("This file is neither Torrent nor Metalink"\
" file. Skipping.")
#define MSG_GID_NOT_PROVIDED "GID is not provided."
#define MSG_CANNOT_PARSE_XML_RPC_REQUEST "Failed to parse xml-rpc request."
#define EX_TIME_OUT _("Timeout.")
#define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.")