Add Check to textutils.tabulate/pagedTabulate #412
Conversation
@@ -122,6 +122,9 @@ local function tabulateCommon( bPaged, ... ) | |||
for n, t in ipairs( tAll ) do | |||
if type(t) == "table" then | |||
for n, sItem in pairs(t) do | |||
if type( sItem ) ~= "number" and type( sItem ) ~= "string" then | |||
error( "textutils.tabulate/pagedTabulate only allow strings and numbers in the table", 3 ) | |||
end |
dan200
Aug 27, 2017
Owner
Please only allow strings here, and format the error message more standardly.
Please only allow strings here, and format the error message more standardly.
BombBloke
Aug 27, 2017
Contributor
Why only strings, all of a sudden? What happened to "no breaking changes"?
Why only strings, all of a sudden? What happened to "no breaking changes"?
JakobDev
Aug 31, 2017
Author
Contributor
What should the message look like? e.g bad argument #Position.Position in Table (expected string, got foo)?
What should the message look like? e.g bad argument #Position.Position in Table (expected string, got foo)?
@dan200 Changes are now done |
ccserver
pushed a commit
to ccserver/ComputerCraft
that referenced
this pull request
Sep 16, 2019
Add Check to textutils.tabulate/pagedTabulate
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.