diff --git a/apps/plasp-app/main.cpp b/apps/plasp-app/main.cpp index 4ae6205..71e50a3 100644 --- a/apps/plasp-app/main.cpp +++ b/apps/plasp-app/main.cpp @@ -135,12 +135,6 @@ int main(int argc, char **argv) logger.logError(e.coordinate(), e.message()); return EXIT_FAILURE; } - catch (const plasp::utils::ParserWarning &e) - { - plasp::utils::Logger logger; - logger.logError(e.coordinate(), e.message()); - return EXIT_FAILURE; - } catch (const plasp::utils::TranslatorException &e) { plasp::utils::Logger logger; diff --git a/include/plasp/utils/ParserWarning.h b/include/plasp/utils/ParserWarning.h deleted file mode 100644 index c970d1e..0000000 --- a/include/plasp/utils/ParserWarning.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __PLASP__UTILS__PARSER_WARNING_H -#define __PLASP__UTILS__PARSER_WARNING_H - -#include -#include - -#include - -namespace plasp -{ -namespace utils -{ - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// -// ParserWarning -// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -class ParserWarning: public std::exception -{ - public: - explicit ParserWarning(const utils::Parser &parser) - : ParserWarning(parser, "Unspecified parser warning") - { - } - - explicit ParserWarning(const utils::Parser &parser, const char *message) - : ParserWarning(parser, static_cast(message)) - { - } - - explicit ParserWarning(const utils::Parser &parser, const std::string &message) - : m_coordinate{parser.coordinate()}, - m_message{message}, - m_plainMessage{m_coordinate.sectionName + ":" + std::to_string(m_coordinate.row) - + ":" + std::to_string(m_coordinate.column) + " " + m_message} - { - } - - ~ParserWarning() throw() - { - } - - const char *what() const throw() - { - return m_plainMessage.c_str(); - } - - const Parser::Coordinate &coordinate() const - { - return m_coordinate; - } - - const std::string &message() const - { - return m_message; - } - - private: - Parser::Coordinate m_coordinate; - std::string m_message; - std::string m_plainMessage; -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -} -} - -#endif diff --git a/src/plasp/pddl/Domain.cpp b/src/plasp/pddl/Domain.cpp index 3ac6ac3..d77d4b5 100644 --- a/src/plasp/pddl/Domain.cpp +++ b/src/plasp/pddl/Domain.cpp @@ -11,7 +11,6 @@ #include #include #include -#include namespace plasp { diff --git a/src/plasp/utils/Logger.cpp b/src/plasp/utils/Logger.cpp index a0ded10..6819606 100644 --- a/src/plasp/utils/Logger.cpp +++ b/src/plasp/utils/Logger.cpp @@ -1,7 +1,6 @@ #include #include -#include namespace plasp { @@ -118,7 +117,7 @@ void Logger::parserWarning(const Parser &parser, const std::string &message) return; if (m_warningLevel == WarningLevel::Error) - throw ParserWarning(parser, message); + throw ParserException(parser, message); const auto coordinate = parser.coordinate();