RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
787 stars 259 forks source link

[Bug]: json.toVars(malformedJSON) returns wrong error message. #4878

Open bubblobill opened 1 month ago

bubblobill commented 1 month ago

Describe the Bug

json.toVars() returns wrong error message when there is a problem with the JSON object.

To Reproduce

in chat paste

[h: malformedJSON = '{"theta": "","shareTrackers": 0, "playSound": {']
[r: json.toVars(malformedJSON)]

you get the error: Function "json.toVars" requires exactly 2 parameters; 1 were provided.

Expected Behaviour

A meaningful error message to assist with debugging

Screenshots

No response

MapTool Info

1.15rc3

Desktop

Win10

Additional Context

No response