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

Compile without exceptions? #908

Closed
sourjon opened this issue Jun 11, 2020 · 5 comments
Closed

Compile without exceptions? #908

sourjon opened this issue Jun 11, 2020 · 5 comments

Comments

@sourjon
Copy link

sourjon commented Jun 11, 2020

Hello,

I'm working on a system that requires the code to be exception free. I've seen a prior post asking about this (#438) but it didn't appear to be resolved. Is there a way to turn off exceptions without heavily modifying the library directly?

Thanks!

@zaphoyd
Copy link
Owner

zaphoyd commented Jun 25, 2020

I took another look through at what it would take to have a completely exception free build and while not trivial it has gotten a lot easier than it used to be as I've slowly shifted new code to support it. I think I might be able to toss up an exception free draft in the next week or two. A real world test use case could be helpful for completing that use case as well.

zaphoyd pushed a commit that referenced this issue Jun 27, 2020
…Update bundled HTTP library to remove the use of exceptions for error handling. All exceptions have been replaced with the error_codes used by the rest of the library either returned or as an output parameter. Documentation has been updated to note when this has happened. The main library interface has been updated to ensure that all functions that can throw are labeled as such and have a non-throwing overload. Nothing has been removed from the main library interface so anyone who uses exception handling with the main library is unaffected. These changes are being done in preparation for adding options to build WebSocket++ on platforms with exceptions disabled. references #438 #908
@zaphoyd
Copy link
Owner

zaphoyd commented Jun 27, 2020

Going to close this as a duplicate in favor of #438. There have been some code updates towards this goal and some additional details over on that issue.

@zaphoyd zaphoyd closed this as completed Jun 27, 2020
@sourjon
Copy link
Author

sourjon commented Jun 29, 2020

Hi @zaphoyd! Sorry I didn't reply sooner. The real world case would be related to devices that require (or perform better with) no exceptions. That's fine to close. Excited to see the update!

@zaphoyd
Copy link
Owner

zaphoyd commented Jun 29, 2020

Hi @sourjon yes, sorry I wasn't clear, I am familiar with why one would want to disable exceptions, what would be useful is having someone who already had an environment or codebase that disabled exceptions to try the new code and report back whether it actually works. =) I can do some theoretical tests but it would be nice to have some real world integration testing to confirm.

@sourjon
Copy link
Author

sourjon commented Jun 30, 2020

Hi @zaphoyd ,

Yep. I have such a codebase available. I can definitely let you know once the updates posted.

@zaphoyd zaphoyd modified the milestone: 0.9.0 Aug 7, 2020
TwentyPast4 pushed a commit to TroniusGaming/websocketpp that referenced this issue Aug 18, 2022
…Update bundled HTTP library to remove the use of exceptions for error handling. All exceptions have been replaced with the error_codes used by the rest of the library either returned or as an output parameter. Documentation has been updated to note when this has happened. The main library interface has been updated to ensure that all functions that can throw are labeled as such and have a non-throwing overload. Nothing has been removed from the main library interface so anyone who uses exception handling with the main library is unaffected. These changes are being done in preparation for adding options to build WebSocket++ on platforms with exceptions disabled. references zaphoyd#438 zaphoyd#908
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

2 participants