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

Fix crash when error()ing an invalid value #337

Closed
wants to merge 3 commits into from
Closed

Fix crash when error()ing an invalid value #337

wants to merge 3 commits into from

Conversation

cheapie
Copy link
Contributor

@cheapie cheapie commented Apr 9, 2017

No description provided.

@sofar
Copy link
Member

sofar commented Apr 30, 2017

👍

@Desour
Copy link
Contributor

Desour commented Apr 30, 2017

Could you please use tostring instead of dump? Now it adds extra "s and if it's a table, it would give new lines that don't fit into the formspec.
Perhaps something like errmsg and (tostring(errmsg) or dump(errmsg)) or "".

@numberZero
Copy link
Contributor

@DS-Minetest Er, the error message is unreadable anyway, so its formatting, basically, doesn’t matter. The crash must be prevented.

@Desour
Copy link
Contributor

Desour commented May 8, 2017

Actually the error messages are readable and useful IMO and using tostring would also fix the bug.

numberZero added a commit that referenced this pull request May 8, 2017
@numberZero
Copy link
Contributor

564bdc2
As error() expects a message (that is, a string), handling of non-string values may be arbitrary as long as it works somehow.

@numberZero numberZero closed this May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants