Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http_exception must derive from std::runtime_error #1765

Open
ignacionr opened this issue Aug 29, 2023 · 0 comments
Open

http_exception must derive from std::runtime_error #1765

ignacionr opened this issue Aug 29, 2023 · 0 comments

Comments

@ignacionr
Copy link

ignacionr commented Aug 29, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant