diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/poco/XML/src/XMLStreamParserException.cpp | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/poco/XML/src/XMLStreamParserException.cpp')
-rw-r--r-- | contrib/libs/poco/XML/src/XMLStreamParserException.cpp | 172 |
1 files changed, 86 insertions, 86 deletions
diff --git a/contrib/libs/poco/XML/src/XMLStreamParserException.cpp b/contrib/libs/poco/XML/src/XMLStreamParserException.cpp index 540dbb26c9..d7b01690ed 100644 --- a/contrib/libs/poco/XML/src/XMLStreamParserException.cpp +++ b/contrib/libs/poco/XML/src/XMLStreamParserException.cpp @@ -1,88 +1,88 @@ -// -// XMLStreamParserException.cpp -// -// Library: XML -// Package: XML -// Module: XMLStreamParserException -// -// Copyright (c) 2015, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/XML/XMLStreamParserException.h" -#include "Poco/XML/XMLStreamParser.h" - - -namespace Poco { -namespace XML { - - -XMLStreamParserException::~XMLStreamParserException() noexcept -{ -} - - -XMLStreamParserException::XMLStreamParserException(const std::string& n, Poco::UInt64 l, Poco::UInt64 c, const std::string& d): - _name(n), - _line(l), - _column(c), - _description(d) -{ - init(); -} - - -XMLStreamParserException::XMLStreamParserException(const XMLStreamParser& p, const std::string& d): - _name(p.inputName()), - _line(p.line()), - _column(p.column()), - _description(d) -{ - init(); -} - - -void XMLStreamParserException::init() -{ - std::ostringstream os; - if (!_name.empty()) - os << _name << ':'; - os << _line << ':' << _column << ": error: " << _description; - _what = os.str(); -} - - +// +// XMLStreamParserException.cpp +// +// Library: XML +// Package: XML +// Module: XMLStreamParserException +// +// Copyright (c) 2015, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/XML/XMLStreamParserException.h" +#include "Poco/XML/XMLStreamParser.h" + + +namespace Poco { +namespace XML { + + +XMLStreamParserException::~XMLStreamParserException() noexcept +{ +} + + +XMLStreamParserException::XMLStreamParserException(const std::string& n, Poco::UInt64 l, Poco::UInt64 c, const std::string& d): + _name(n), + _line(l), + _column(c), + _description(d) +{ + init(); +} + + +XMLStreamParserException::XMLStreamParserException(const XMLStreamParser& p, const std::string& d): + _name(p.inputName()), + _line(p.line()), + _column(p.column()), + _description(d) +{ + init(); +} + + +void XMLStreamParserException::init() +{ + std::ostringstream os; + if (!_name.empty()) + os << _name << ':'; + os << _line << ':' << _column << ": error: " << _description; + _what = os.str(); +} + + const char* XMLStreamParserException::name() const noexcept -{ - return _name.c_str(); -} - - -Poco::UInt64 XMLStreamParserException::line() const -{ - return _line; -} - - -Poco::UInt64 XMLStreamParserException::column() const -{ - return _column; -} - - -const std::string& XMLStreamParserException::description() const -{ - return _description; -} - - +{ + return _name.c_str(); +} + + +Poco::UInt64 XMLStreamParserException::line() const +{ + return _line; +} + + +Poco::UInt64 XMLStreamParserException::column() const +{ + return _column; +} + + +const std::string& XMLStreamParserException::description() const +{ + return _description; +} + + char const* XMLStreamParserException::what() const noexcept -{ - return _what.c_str(); -} - - -} } // namespace Poco::XML +{ + return _what.c_str(); +} + + +} } // namespace Poco::XML |