From dac38cb49eb48ff71a5706ec30bb88ba65831b9e Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 7 Aug 2021 12:13:30 +0200 Subject: [PATCH] feat: show the table we can't parse --- sonic-radiance.love/birb/utils/table.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sonic-radiance.love/birb/utils/table.lua b/sonic-radiance.love/birb/utils/table.lua index 4b1cfe3..2a959eb 100644 --- a/sonic-radiance.love/birb/utils/table.lua +++ b/sonic-radiance.love/birb/utils/table.lua @@ -139,7 +139,10 @@ function Table.parse(table, structure, nullableNbr) nullableNbr = nullableNbr or 0 if ((#table) > (#structure)) or ((#table) < (#structure - nullableNbr)) then - error("The table to parse doesn't have the right number of arguments: " .. #table .. " instead of " .. #structure .. " and " .. nullableNbr .. " nullables") + error("The table to parse " .. Table.toString(table) .. + " doesn't have the right number of arguments: " .. #table .. + " instead of " .. #structure .. + " and " .. nullableNbr .. " nullables") else for i, key in ipairs(structure) do parsedTable[key] = table[i]