OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
parse_error.cpp
Go to the documentation of this file.
1#include "parse_error.h"
2#include <sstream>
3
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
16 {
17 return m_parseInfo;
18 }
19
20 std::string parse_error::sourceLocation() const
21 {
22 return sourceFile.filename().string() + ":" + std::to_string(sourceLine);
23 }
24
25 char const* parse_error::what() const noexcept
26 {
27 return WHAT_STR;
28 }
29}
const parse_info & getParseInfo() const
std::string toString(const std::string &message="") const
char const * what() const noexcept
std::string sourceLocation() const
std::string toString(const std::string &message="") const
Definition parse_info.cpp:6