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

Handle panics in virtual interface methods #757

Merged
merged 2 commits into from
Jul 14, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Jun 12, 2024

Catches panics occurring in virtual calls.
Fixes #422.

Due to a lack of error reporting in Godot's virtual call mechanism, we cannot transport the errors to the user, neither as panics nor as CallError in Object::try_call(). If this is desired, we might want to work out a specific design for it in the future.

@Bromeon Bromeon added bug c: register Register classes, functions and other symbols to GDScript labels Jun 12, 2024
@Bromeon Bromeon force-pushed the bugfix/virtual-call-panics branch from 4f6b0b1 to e37ff77 Compare July 14, 2024 11:02
@Bromeon Bromeon force-pushed the bugfix/virtual-call-panics branch from e37ff77 to 5a989fe Compare July 14, 2024 11:03
@Bromeon Bromeon marked this pull request as ready for review July 14, 2024 11:03
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-757

Since there is no way to check for errors on the call site in the case of ptrcalls,
such entries could never be removed. If in the future there is an automatic removal,
this could be re-enabled.
@Bromeon Bromeon enabled auto-merge July 14, 2024 11:12
@Bromeon Bromeon added this pull request to the merge queue Jul 14, 2024
@godot-rust godot-rust deleted a comment from GodotRust Jul 14, 2024
Merged via the queue into master with commit b759586 Jul 14, 2024
15 checks passed
@Bromeon Bromeon deleted the bugfix/virtual-call-panics branch July 14, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c: register Register classes, functions and other symbols to GDScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_Virtual trait functions unable to handle panic
2 participants