APIDump: Proper error messages on apicheck failures.
This commit is contained in:
parent
775ad81f4d
commit
f5adb67f2f
@ -1886,6 +1886,8 @@ end
|
|||||||
|
|
||||||
--- Checks the currently undocumented symbols against an "official" undocumented symbol list
|
--- Checks the currently undocumented symbols against an "official" undocumented symbol list
|
||||||
-- Returns an array-table of strings representing the newly-undocumented symbol names
|
-- Returns an array-table of strings representing the newly-undocumented symbol names
|
||||||
|
-- If no newly undocumented symbols are found, returns no value.
|
||||||
|
-- If an error occurs, returns true and error message.
|
||||||
local function CheckNewUndocumentedSymbols()
|
local function CheckNewUndocumentedSymbols()
|
||||||
-- Download the official API stats on undocumented stuff:
|
-- Download the official API stats on undocumented stuff:
|
||||||
-- (We need a blocking downloader, which is impossible with the current cNetwork API)
|
-- (We need a blocking downloader, which is impossible with the current cNetwork API)
|
||||||
@ -2103,10 +2105,14 @@ local function HandleCmdApiCheck(a_Split, a_EntireCmd)
|
|||||||
|
|
||||||
-- Check for new symbols that are not documented:
|
-- Check for new symbols that are not documented:
|
||||||
LOG("Checking API for newly undocumented symbols...")
|
LOG("Checking API for newly undocumented symbols...")
|
||||||
local newUndocumented = CheckNewUndocumentedSymbols()
|
local newUndocumented, msg = CheckNewUndocumentedSymbols()
|
||||||
if (newUndocumented) then
|
if (newUndocumented) then
|
||||||
|
if (newUndocumented == true) then
|
||||||
|
return true, "Cannot check for new undocumented symbols: " .. (msg or "<no message>")
|
||||||
|
else
|
||||||
return true, "Found new undocumented symbols:\n" .. table.concat(newUndocumented, "\n")
|
return true, "Found new undocumented symbols:\n" .. table.concat(newUndocumented, "\n")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- The check completed successfully, remove the "test failed" flag from the filesystem:
|
-- The check completed successfully, remove the "test failed" flag from the filesystem:
|
||||||
cFile:DeleteFile("apiCheckFailed.flag")
|
cFile:DeleteFile("apiCheckFailed.flag")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user