cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

http_exception must derive from std::runtime_error

Open ignacionr opened this issue 2 years ago • 0 comments

http_exception Should Derive from std::runtime_error

First of all, I want to say thank you for creating such an outstanding library. The cpprestsdk is a comprehensive toolkit that offers a deep understanding of the components involved, especially in the C++ ecosystem.

While working with the library, I noticed an area that could be improved. In my projects, I typically separate exceptions into different categories, such as runtime errors and logic errors. This helps me handle them more effectively. I was surprised to find that http_exception, which I believe falls under the runtime error category, wasn't caught by my existing exception-handling code.

Would it be possible to have http_exception derive from std::runtime_error? I believe this would align well with standard C++ practices and make it easier to integrate the library into existing projects. Are there any potential downsides or pitfalls to making this change?

Thank you for considering this suggestion, and I look forward to your thoughts.

ignacionr avatar Aug 29 '23 16:08 ignacionr