mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-28 22:23:21 +01:00
Fixed string+int issues in headers
This commit is contained in:
parent
9e0fdfdfdc
commit
5cfbe17a66
2 changed files with 8 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <SAX/Attributes.hpp>
|
#include <SAX/Attributes.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
namespace Arabica
|
namespace Arabica
|
||||||
{
|
{
|
||||||
|
@ -546,9 +547,9 @@ private:
|
||||||
void badIndex(unsigned int index)
|
void badIndex(unsigned int index)
|
||||||
{
|
{
|
||||||
// sort out
|
// sort out
|
||||||
std::string msg =
|
std::stringstream msg;
|
||||||
"Attempt to modify attribute at illegal index: " + index;
|
msg << "Attempt to modify attribute at illegal index: " << index;
|
||||||
throw std::out_of_range(msg);
|
throw std::out_of_range(msg.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
class AttributeNamed
|
class AttributeNamed
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef ARABICA_SAX_TAGGLE_HTML_SCANNER_HPP
|
#ifndef ARABICA_SAX_TAGGLE_HTML_SCANNER_HPP
|
||||||
#define ARABICA_SAX_TAGGLE_HTML_SCANNER_HPP
|
#define ARABICA_SAX_TAGGLE_HTML_SCANNER_HPP
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
#include <SAX/SAXException.hpp>
|
#include <SAX/SAXException.hpp>
|
||||||
#include <SAX/Locator.hpp>
|
#include <SAX/Locator.hpp>
|
||||||
#include <XML/XMLCharacterClasses.hpp>
|
#include <XML/XMLCharacterClasses.hpp>
|
||||||
|
@ -473,7 +474,9 @@ public:
|
||||||
outputBuffer_.clear();
|
outputBuffer_.clear();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw std::runtime_error("Can't process state " + action);
|
throw std::runtime_error(
|
||||||
|
"Can't process state " + static_cast<std::stringstream const&>(
|
||||||
|
std::stringstream() << action).str());
|
||||||
} // switch ...
|
} // switch ...
|
||||||
state_ = nextState_;
|
state_ = nextState_;
|
||||||
} // while (state_ != S_DONE)
|
} // while (state_ != S_DONE)
|
||||||
|
|
Loading…
Reference in a new issue