Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nngraph.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Reynolds <mareynolds@google.com>2016-01-29 14:21:48 +0300
committerMalcolm Reynolds <mareynolds@google.com>2016-01-29 14:21:48 +0300
commit1c5742fef67edf3ce20eb2e0cae9f1abee5e3ce4 (patch)
tree96a22e587ba6ad2800e00b61c39e61c871e45a2d
parent3e84c827f635ee516c17d5374360501626ced13d (diff)
avoid string concatenation error when key type is not string or number
-rw-r--r--nesting.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/nesting.lua b/nesting.lua
index a58066b..4440797 100644
--- a/nesting.lua
+++ b/nesting.lua
@@ -62,7 +62,8 @@ function nesting.copyNested(output, input)
-- Extra elements in the output table cause an error.
for key, child in pairs(output) do
if not input[key] then
- error('key ' .. key .. ' present in output but not in input')
+ error('key ' .. tostring(key) ..
+ ' present in output but not in input')
end
end
end