GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 25.0% 1 / 0 / 4
Functions: 33.3% 1 / 0 / 3
Branches: 100.0% 1 / 0 / 1

ruby/interpreter/RubyException.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 CLI_RUBYEXCEPTION_HPP
7 #define CLI_RUBYEXCEPTION_HPP
8
9 #include <stdexcept>
10 #include <string>
11
12 class RubyException : public std::runtime_error
13 {
14 public:
15
1/1
✓ Branch 2 taken 1 time.
1 RubyException(const std::string& msg, const std::string& location) : std::runtime_error(msg), m_location(location) {}
16 RubyException(const RubyException&) = default;
17 RubyException& operator=(const RubyException&) = default;
18 RubyException(RubyException&&) = default;
19 RubyException& operator=(RubyException&&) = default;
20 ✗ virtual ~RubyException() noexcept override = default;
21
22 ✗ std::string location() const {
23 ✗ return m_location;
24 }
25
26 private:
27 std::string m_location;
28 };
29
30 #endif // CLI_RUBYEXCEPTION_HPP
31