-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add error handling to property setting #14244
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
base: main
Are you sure you want to change the base?
Conversation
|
I see this is still marked draft. Is this something you'd like to get in for SDL 3.4 release? |
|
This was just a few (random) examples, but there are many many more instances to fix: output |
|
Right, is that something you'd like to take on? Currently they're mostly ignored because properties are generally optional and the only way they can fail is out of memory, in which case you'll get other, more critical, failures. However, I'm not opposed to someone adding more rigorous error checking if they want. |
That was my intent initially, but in fact this is a huge amount of work. Not sure that I will finish this soon. |
Okay, no worries, I'll move this out of the milestone then. |
SDL_CreateProperties()and allSDL_SetXXXProperty()methods allocate memory, so they may fail. However, error handling is missing.Description
This PR adds error handling to some calls to
SDL_CreateProperties()andSDL_SetXXXProperty(). Just a few examples for now, but there are many more.