1
0

Build Lua in C++ mode, use exceptions for error-raising. (#3680)

Fixes #3678 .
This commit is contained in:
Mattes D 2017-04-26 23:02:57 +02:00 committed by GitHub
parent 7960d142ca
commit 85f11694da
2 changed files with 11 additions and 1 deletions

View File

@ -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...")

@ -1 +1 @@
Subproject commit 9d4dbf9b7e83c0111a5798f1315920df989f94de
Subproject commit 5f54aca0d4272e5c260adb100e8249c560a853ac