-
Notifications
You must be signed in to change notification settings - Fork 958
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
Use standard c++ exceptions #1853
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CendioOssman
force-pushed
the
stdexcept
branch
2 times, most recently
from
October 20, 2024 11:52
a779875
to
e381dba
Compare
samhed
approved these changes
Nov 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
CendioOssman
force-pushed
the
stdexcept
branch
from
November 4, 2024 13:11
e381dba
to
89e1fa3
Compare
These seem to always be in ASCII and English, unfortunately, but let's at least use the API the could give use something more useful.
In preparation for using the built in C++ exception classes, which do not accept a format string.
In preparation for using the built-in exception types, where the string can only be set via the constructor.
Harmonize with the standard C++ exceptions.
Make sure our exceptions are part of the standard exception class hierarchy.
Implicitly gives us the correct exceptions on errors instead of us having to check and throw ourselves.
Use the more specific already included exception classes for common errors to keep things more understandable.
Make it easier to identify communication issues.
There is no point to having our own generic exception class. Let's use the one provided by the standard C++ library.
Make sure the required Windows defines are always available.
This makes things more consistent since we mix with the standard library exceptions so often.
CendioOssman
force-pushed
the
stdexcept
branch
from
November 6, 2024 20:24
89e1fa3
to
2b78572
Compare
samhed
approved these changes
Nov 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clean up our exception handling by using the standard exception classes provided by C++.