-
Notifications
You must be signed in to change notification settings - Fork 20
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
geodot kills godot if requested file does not exist #26
Comments
Thanks for the remarks! Should we just return null and leave the error handling to the GDScript code? (+ output a proper Godot Error) |
Yes, the error should be handled where we have our "proper" logging and the code has enough information to estimate the impact of the failed call. So handling this in GDScript seems correct to me. |
An empty list is now returned instead of doing something which kills Godot. However, this solution is not final since we only output the error to the console at the moment. It's not trivial to let the GDNative layer know what went wrong, we might have to go with an Exception? Though Exceptions are unpopular in game programming...
The crash should be prevented with c7c6064 - an empty list is returned if the dataset is invalid. Currently, an error is printed to the console saying that the dataset couldn't be opened, but we'd want to get this error into Godot. We might need to use Exceptions for this. They're not commonly used in game development, so I'm not sure whether we want to bring them into Geodot? |
Seems like with GDExtension there are ways to properly propagate errors to Godot like |
Blocked by godotengine/godot-cpp#521 |
Prevents crashes and insteads prints Errors to Godot's Debugger. Fixes part of #26, but this type of error handling should be added everywhere.
see discord and remarks in 34a3c49
The text was updated successfully, but these errors were encountered: