Skip to content

Add _err_print_script_error helper methods#2022

Open
Naros wants to merge 1 commit into
godotengine:masterfrom
Naros:add-err_print_script_error
Open

Add _err_print_script_error helper methods#2022
Naros wants to merge 1 commit into
godotengine:masterfrom
Naros:add-err_print_script_error

Conversation

@Naros

@Naros Naros commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@dsnopek as discussed on RChat, here's the implementations for the "print_script_error" APIs

@dsnopek dsnopek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

I think this should have some #ifdefs to handle the being compiled when targeting Godot 4.7 and earlier. We could maybe have the _err_print_script_error() functions fallback to print_error()?

Also, how are developers meant to call the _err_print_script_error() functions? We need a public API. If we're to match Godot's internals, this would be _err_print_error() with an ErrorHandlerType enum, but maybe it'd be better to add a nicer API to Godot for this (and then have godot-cpp match that)?

@dsnopek dsnopek added the enhancement This is an enhancement on the current functionality label Jul 24, 2026
@dsnopek dsnopek added this to the 10.x milestone Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This is an enhancement on the current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants