Skip to content

Commit e255e6a

Browse files
committed
Add coments
1 parent e1c98c9 commit e255e6a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

search_engine_cpp/lib/include/exceptions/invalid_pointer_exception.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,31 @@
55
#include <string>
66

77
namespace exceptions {
8+
9+
/**
10+
* @class invalid_pointer_exception
11+
* @brief Exception indicating the use of an invalid pointer.
12+
*
13+
* This exception is derived from `std::exception` and can be thrown
14+
* when an invalid pointer is detected.
15+
*/
816
class invalid_pointer_exception : public std::exception {
917
public:
18+
/**
19+
* @brief Constructor for the invalid_pointer_exception class.
20+
*
21+
* Initializes a new instance of the exception.
22+
*/
1023
invalid_pointer_exception();
1124

25+
/**
26+
* @brief Returns a descriptive error message.
27+
*
28+
* @return A C-style string describing the error.
29+
*/
1230
const char* what() const noexcept override;
1331
};
32+
1433
} // namespace exceptions
1534

16-
#endif
35+
#endif // INVALID_POINTER_H

0 commit comments

Comments
 (0)