LCOV - code coverage report
Current view: top level - OdbDesignLib/FileModel - parse_error.cpp (source / functions) Coverage Total Hit
Test: OdbDesign Test Coverage Lines: 100.0 % 12 12
Test Date: 2026-11-21 03:51:50 Functions: 100.0 % 4 4
Legend: Lines: hit not hit

            Line data    Source code
       1              : #include "parse_error.h"
       2              : #include <sstream>
       3              : 
       4              : namespace Odb::Lib::FileModel
       5              : {
       6              : 
       7           16 :     std::string parse_error::toString(const std::string& message) const
       8              :     {
       9           16 :         std::stringstream ss;
      10           16 :         ss << m_parseInfo.toString(message) << std::endl;
      11           16 :         ss << "location: " << sourceFile.filename().string() << ":" << sourceLine;
      12           32 :         return ss.str();
      13           16 :     }
      14              : 
      15            1 :     const parse_info& parse_error::getParseInfo() const
      16              :     {
      17            1 :         return m_parseInfo;
      18              :     }
      19              : 
      20            1 :     std::string parse_error::sourceLocation() const
      21              :     {
      22            1 :         return sourceFile.filename().string() + ":" + std::to_string(sourceLine);
      23              :     }
      24              : 
      25            1 :     char const* parse_error::what() const noexcept
      26              :     {
      27            1 :         return WHAT_STR;
      28              :     }
      29              : }
        

Generated by: LCOV version 2.0-1