GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 42.9% 3 / 1 / 8
Functions: 42.9% 3 / 1 / 8
Branches: 50.0% 11 / 1 / 23

src/energyplus/ErrorFile.hpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #ifndef ENERGYPLUS_ERRORFILE_HPP
7 #define ENERGYPLUS_ERRORFILE_HPP
8
9 #include "EnergyPlusAPI.hpp"
10
11 #include "../utilities/core/Path.hpp"
12 #include "../utilities/core/Enum.hpp"
13 #include "../utilities/core/Logger.hpp"
14
15 #include <string>
16 #include <vector>
17
18 namespace openstudio {
19 namespace energyplus {
20
21 // clang-format off
22
23 /** \class ErrorLevel
24 * \brief EnergyPlus warning/error levels */
25
11/22
openstudio::energyplus::ErrorLevel::buildStringVec[abi:cxx11](bool):
✓ Branch 0 taken 45 times.
✓ Branch 1 taken 45 times.
✓ Branch 3 taken 45 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 45 times.
✗ Branch 9 not taken.
✗ Branch 12 not taken.
✓ Branch 17 taken 45 times.
✓ Branch 20 taken 45 times.
✓ Branch 23 taken 60 times.
✓ Branch 24 taken 60 times.
✓ Branch 25 taken 30 times.
✓ Branch 26 taken 30 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 30 times.
openstudio::energyplus::ErrorLevel::enumName[abi:cxx11]():
✗ Branch 1 not taken.
openstudio::energyplus::operator<<(std::ostream&, openstudio::energyplus::ErrorLevel const&):
✗ Branch 1 not taken.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
1314 OPENSTUDIO_ENUM(ErrorLevel,
26 ((Warning))
27 ((Severe))
28 ((Fatal))
29 );
30
31 // clang-format on
32
33 class ENERGYPLUS_API ErrorFile
34 {
35 public:
36 /// constructor
37 ErrorFile(const openstudio::path& errPath);
38
39 /// get warnings
40 std::vector<std::string> warnings() const;
41
42 /// get severe errors
43 std::vector<std::string> severeErrors() const;
44
45 /// get fatal errors
46 std::vector<std::string> fatalErrors() const;
47
48 /// did EnergyPlus complete or crash
49 bool completed() const;
50
51 /// completed successfully
52 bool completedSuccessfully() const;
53
54 private:
55 − REGISTER_LOGGER("energyplus.ErrorFile");
56
57 void parse(openstudio::filesystem::ifstream& is);
58
59 std::vector<std::string> m_warnings;
60 std::vector<std::string> m_severeErrors;
61 std::vector<std::string> m_fatalErrors;
62 bool m_completed;
63 bool m_completedSuccessfully;
64 };
65
66 } // namespace energyplus
67 } // namespace openstudio
68
69 #endif // ENERGYPLUS_ERRORFILE_HPP
70