LCOV - code coverage report
Current view: top level - com-middleware/src/exceptions - CanInitException.hpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 3 0
Test Date: 2025-06-11 17:47:30 Functions: 0.0 % 4 0
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #ifndef CAN_DRIVER_EXCEPTIONS_CANINITEXCEPTION_HPP
       2                 :             : #define CAN_DRIVER_EXCEPTIONS_CANINITEXCEPTION_HPP
       3                 :             : 
       4                 :             : #include <exception>
       5                 :             : #include <string>
       6                 :             : #include <utility>
       7                 :             : 
       8                 :             : namespace candriver::exceptions {
       9                 :             : 
      10                 :             : using std::exception;
      11                 :             : using std::string;
      12                 :             : 
      13                 :             : /**
      14                 :             :  * @brief An exception that may be thrown when an error occurred while initialising a CAN socket.
      15                 :             :  */
      16                 :             : class CanInitException : public exception {
      17                 :             :    public:  // +++ Constructor / Destructor +++
      18                 :           0 :     explicit CanInitException(string message) : _message(std::move(message)) {}
      19                 :           0 :     virtual ~CanInitException() {}
      20                 :           0 :     [[nodiscard]] auto what() const noexcept -> const char* override { return _message.c_str(); }
      21                 :             : 
      22                 :             :    private:
      23                 :             :     string _message;
      24                 :             : };
      25                 :             : 
      26                 :             : }  // namespace candriver::exceptions
      27                 :             : 
      28                 :             : #endif  // CAN_DRIVER_EXCEPTIONS_CANINITEXCEPTION_HPP
        

Generated by: LCOV version 2.0-1