12 Exception::Exception(
unsigned int line,
const std::string &func,
const std::string &fname,
const std::string &message ) :
25 std::string
Exception::createMessage(
unsigned int line,
const std::string &func,
const std::string &fname,
const std::string &message )
const {
26 return "in file: " + fname +
" (l." + std::to_string(line) +
")\nin function: " + func +
"\nmessage: " + message ;
31 std::string
Exception::createMessage(
const std::string &previous,
unsigned int line,
const std::string &func,
const std::string &fname,
const std::string &message )
const {
32 if( previous.empty() ) {
36 return previous +
"\n" +
createMessage(line, func, fname, message) ;
const char * what() const noexcept override
Get the full exception message.
std::string createMessage(unsigned int line, const std::string &func, const std::string &fname, const std::string &message) const
Helper function creating the full exception message.
const std::string _message
< The full exception message