summaryrefslogtreecommitdiffstats
path: root/Server
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-04-26 23:02:57 +0200
committerGitHub <noreply@github.com>2017-04-26 23:02:57 +0200
commit85f11694da64c2033026e82b71fcf9ac8ed69735 (patch)
tree1594b55de29621357ebb8a935c747942e75fc423 /Server
parentAPIDoc: Corrected a few links (diff)
downloadcuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.tar
cuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.tar.gz
cuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.tar.bz2
cuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.tar.lz
cuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.tar.xz
cuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.tar.zst
cuberite-85f11694da64c2033026e82b71fcf9ac8ed69735.zip
Diffstat (limited to 'Server')
-rw-r--r--Server/Plugins/Debuggers/Debuggers.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/Server/Plugins/Debuggers/Debuggers.lua b/Server/Plugins/Debuggers/Debuggers.lua
index 2b9ed1bf0..7d7246484 100644
--- a/Server/Plugins/Debuggers/Debuggers.lua
+++ b/Server/Plugins/Debuggers/Debuggers.lua
@@ -2173,6 +2173,16 @@ function HandleConsoleTestJson(a_Split, a_EntireCmd)
assert(type(msg) == "string")
LOG("Json parsing an invalid string: Error message returned: " .. msg)
+ local isSuccess, t3
+ isSuccess, t3, msg = pcall(cJson.Parse, cJson, nil)
+ if (isSuccess) then
+ LOG(string.format("Json parsing a 'nil' produced a %s and a %s, msg is %s.",
+ type(t3), type(msg), msg or "<nil>"
+ ))
+ else
+ LOG("Json parsing a 'nil' raised an error")
+ end
+
LOG("Json parsing test succeeded")
LOG("Testing Json serializing...")