mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
33 lines
668 B
C++
33 lines
668 B
C++
#include "ParsingException.h"
|
|
|
|
#include <sstream>
|
|
|
|
ParsingException::ParsingException(const TokenPos position, std::string message)
|
|
: m_pos(position),
|
|
m_message(std::move(message))
|
|
{
|
|
std::ostringstream str;
|
|
str << position.m_filename << " L" << m_pos.m_line << ':' << m_pos.m_column << ' ' << m_message;
|
|
m_full_message = str.str();
|
|
}
|
|
|
|
TokenPos ParsingException::Position() const
|
|
{
|
|
return m_pos;
|
|
}
|
|
|
|
const std::string& ParsingException::Message() const
|
|
{
|
|
return m_message;
|
|
}
|
|
|
|
std::string ParsingException::FullMessage() const
|
|
{
|
|
return m_full_message;
|
|
}
|
|
|
|
char const* ParsingException::what() const
|
|
{
|
|
return m_full_message.c_str();
|
|
}
|