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
|
||||
-- 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()
|
||||
-- Download the official API stats on undocumented stuff:
|
||||
-- (We need a blocking downloader, which is impossible with the current cNetwork API)
|
||||
@ -2103,9 +2105,13 @@ local function HandleCmdApiCheck(a_Split, a_EntireCmd)
|
||||
|
||||
-- Check for new symbols that are not documented:
|
||||
LOG("Checking API for newly undocumented symbols...")
|
||||
local newUndocumented = CheckNewUndocumentedSymbols()
|
||||
local newUndocumented, msg = CheckNewUndocumentedSymbols()
|
||||
if (newUndocumented) then
|
||||
return true, "Found new undocumented symbols:\n" .. table.concat(newUndocumented, "\n")
|
||||
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")
|
||||
end
|
||||
end
|
||||
|
||||
-- The check completed successfully, remove the "test failed" flag from the filesystem:
|
||||
|
Loading…
Reference in New Issue
Block a user