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
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
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
}
Odb::Lib::FileModel::parse_error::getParseInfo
const parse_info & getParseInfo() const
Definition
parse_error.cpp:15
Odb::Lib::FileModel::parse_error::toString
std::string toString(const std::string &message="") const
Definition
parse_error.cpp:7
Odb::Lib::FileModel::parse_error::what
char const * what() const noexcept
Definition
parse_error.cpp:25
Odb::Lib::FileModel::parse_error::sourceLocation
std::string sourceLocation() const
Definition
parse_error.cpp:20
Odb::Lib::FileModel
Definition
Constants.h:8
parse_error.h
Odb::Lib::FileModel::parse_info
Definition
parse_info.h:9
Odb::Lib::FileModel::parse_info::toString
std::string toString(const std::string &message="") const
Definition
parse_info.cpp:6
OdbDesignLib
FileModel
parse_error.cpp
Generated by
1.9.8