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

Add new "push_*()" functions to GDScript #23404

Merged
merged 2 commits into from
Nov 2, 2018

Conversation

YeldhamDev
Copy link
Member

I really think these should be named something like debug_error() and debug_warn() (most print*() functions should be renamed to be honest), but I'm sticking with the original names from that PR for now.

Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

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

How is this different from printerr, and could that functionality be added to printerr?

@neikeq
Copy link
Contributor

neikeq commented Oct 31, 2018

printerr is equivalent of print that prints to stderr instead of stdout.

It's not the same as error macros like ERR_PRINT which does way more than printing to stderr (like coloring, function and line information, editor/debugger).

@akien-mga akien-mga added this to the 3.1 milestone Oct 31, 2018
@akien-mga
Copy link
Member

I like the feature, but I don't think log_* is a good name, as there's no relationship to a logging mechanism (does not write to a log file, etc.). I guess the intended meaning was something like register_error (in the debugger's error stack).

I'd suggest push_error and push_warning, as it basically just adds a new error/warning to the debugger's stack.

@YeldhamDev
Copy link
Member Author

@akien-mga

does not write to a log file, etc.

Actually it does, it's just that it only writes that it was called from inside the cpp file, which basically makes it useless there:

**ERROR**: Example
   At: modules/gdscript/gdscript_functions.cpp:729:call() - Example

Also, I can change the function names, but then I will have to change them in the C# side as well.

@YeldhamDev YeldhamDev force-pushed the gdscript_log_methods branch from 094fb93 to 65b9d8a Compare October 31, 2018 18:31
@YeldhamDev YeldhamDev force-pushed the gdscript_log_methods branch from 65b9d8a to 9234269 Compare October 31, 2018 18:42
@YeldhamDev YeldhamDev changed the title Add new log functions to GDScript Add new "push_*()" functions to GDScript Oct 31, 2018
@akien-mga akien-mga merged commit eed56bc into godotengine:master Nov 2, 2018
@akien-mga
Copy link
Member

Thanks!

@YeldhamDev YeldhamDev deleted the gdscript_log_methods branch November 2, 2018 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants