123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef _FASTDDS_RTPS_EXCEPTIONS_EXCEPTION_H_
- #define _FASTDDS_RTPS_EXCEPTIONS_EXCEPTION_H_
- #include <fastrtps/fastrtps_dll.h>
- #include <exception>
- #include <string>
- #include <cstdint>
- #undef minor
- namespace eprosima {
- namespace fastrtps {
- namespace rtps {
- class Exception : public std::exception
- {
- public:
- RTPS_DllAPI Exception(){};
-
- virtual RTPS_DllAPI ~Exception() throw();
-
- RTPS_DllAPI const int32_t& minor() const;
-
- RTPS_DllAPI void minor(const int32_t &minor);
-
- virtual RTPS_DllAPI void raise() const = 0;
-
- virtual RTPS_DllAPI const char* what() const throw();
- protected:
-
- RTPS_DllAPI explicit Exception(const char* const& message);
-
- RTPS_DllAPI Exception(const Exception &ex);
-
- RTPS_DllAPI Exception(Exception&& ex);
-
- RTPS_DllAPI explicit Exception(const char* const& message, const int32_t minor);
-
- RTPS_DllAPI Exception& operator=(const Exception& ex);
-
- RTPS_DllAPI Exception& operator=(Exception&& ex);
- private:
- std::string message_;
- int32_t minor_;
- };
- }
- }
- }
- #endif
|