Module:T-Norm: Difference between revisions

// via Wikitext Extension for VSCode
Tag: Reverted
// via Wikitext Extension for VSCode
Tag: Reverted
Line 56: Line 56:
Blueprint.addPreprocessor(template, 'deriveRegionFromCountry') -- Possible blueprint default
Blueprint.addPreprocessor(template, 'deriveRegionFromCountry') -- Possible blueprint default


-- Test error: Attempt to call a non-existent function to test error handling
-- Test error: Add a controlled error within the rendering pipeline
Blueprint.addPreprocessor(template, function(template, args)
Blueprint.addPreprocessor(template, function(template, args)
     -- This will cause an error: attempting to call a non-existent function
     -- Add a test field that will cause an error during field processing
     local result = nonExistentFunction("test parameter")
     if args.name and args.name:lower():find("test") then
        args.testErrorField = "trigger_error"
    end
     return args
     return args
end)
end)