OdbDesignLib
OdbDesign ODB++ Parsing Library
parse_error.cpp
1 #include "parse_error.h"
2 #include <sstream>
3 
4 namespace Odb::Lib::FileModel
5 {
6 
7  std::string parse_error::toString(const std::string& message) const
8  {
9  std::stringstream ss;
10  ss << m_parseInfo.toString(message) << std::endl;
11  ss << "location: " << sourceFile.filename().string() << ":" << sourceLine;
12  return ss.str();
13  }
14 
15  const parse_info& parse_error::getParseInfo() const
16  {
17  return m_parseInfo;
18  }
19 
20  char const* parse_error::what() const noexcept
21  {
22  return WHAT_STR;
23  }
24 }