Skip to content

Always use godot_error in panic hook#1647

Open
QuinnPainter wants to merge 1 commit into
godot-rust:masterfrom
QuinnPainter:panic_error_print
Open

Always use godot_error in panic hook#1647
QuinnPainter wants to merge 1 commit into
godot-rust:masterfrom
QuinnPainter:panic_error_print

Conversation

@QuinnPainter

Copy link
Copy Markdown

Since #1632 prints are safe to do from any thread. So it's no longer necessary for the print inside the panic hook to be gated on experimental-threads.

(sidenote: is there a reason the backtrace isn't also printed in Godot?)

@Bromeon Bromeon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks a lot!

Comment thread godot-core/src/private.rs
where
F: Fn() -> bool + Send + Sync + 'static,
{
pub fn set_gdext_hook() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename this to install_godot_rust_hook now 🙂

@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: core Core components labels Jun 26, 2026
@GodotRust

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: core Core components quality-of-life No new functionality, but improves ergonomics/internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants