LCOV - code coverage report
Current view: top level - include/exception - ImportExportException.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 4 4 100.0 %
Date: 2024-12-28 17:36:05 Functions: 3 4 75.0 %

          Line data    Source code
       1             : 
       2             : #pragma once
       3             : #include <exception>
       4             : #include <string>
       5             : 
       6             : namespace sipai {
       7             : /**
       8             :  * @brief A custom exception class that inherits from std::exception.
       9             :  * This class is thrown when there are issues with neural Import/Export
      10             :  * operations.
      11             :  */
      12             : class ImportExportException : public std::exception {
      13             : public:
      14             :   ImportExportException() = default;
      15           2 :   virtual ~ImportExportException() = default;
      16           2 :   explicit ImportExportException(const std::string &message)
      17           2 :       : message_(message) {}
      18           2 :   const char *what() const noexcept override { return message_.c_str(); }
      19             : 
      20             : private:
      21             :   std::string message_;
      22             : };
      23             : } // namespace sipai

Generated by: LCOV version 1.16