Module:ErrorHandling: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 153: Line 153:
     local statusOutput = ErrorHandling.formatStatusOutput(context)
     local statusOutput = ErrorHandling.formatStatusOutput(context)
      
      
    -- Simply concatenate the two outputs. If one is empty, it won't affect the other.
    -- A newline is added to ensure they are on separate lines in the HTML source.
     if errorOutput ~= "" and statusOutput ~= "" then
     if errorOutput ~= "" and statusOutput ~= "" then
         return errorOutput .. "\n" .. statusOutput
         return errorOutput .. "\n" .. statusOutput
    elseif errorOutput ~= "" then
        return errorOutput
    else
        return statusOutput
     end
     end
   
    return errorOutput or statusOutput
end
end