<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Modul:CallAssert/doc - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Modul:CallAssert/doc&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Wed, 18 Nov 2026 05:46:50 GMT</lastBuildDate>
		<item>
			<title>Programmer: Oʻzbekcha Vikipediyadan import qilindi.</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:CallAssert/doc&amp;diff=98960&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:CallAssert/doc&amp;diff=98960&amp;oldid=prev</guid>
			<description>&lt;p&gt;Oʻzbekcha Vikipediyadan import qilindi.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Yangi sahifa&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|r}}&lt;br /&gt;
{{used in system}}&lt;br /&gt;
This [[Help:Lua metamodules|metamodule]] provides function &amp;#039;&amp;#039;&amp;#039;callAssert&amp;#039;&amp;#039;&amp;#039;, which simplifies error checking by throwing an error if a given function returns nil or false. This is similar to the built-in function [[mw:LUAREF#assert|assert]], but unlike it, callAssert itself calls the function, whose return value is to be checked. This allows it to include the function name and argument values in the error message.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 local callAssert = require(&amp;#039;Module:CallAssert&amp;#039;)&lt;br /&gt;
 local result1, result2, etc = &amp;#039;&amp;#039;&amp;#039;callAssert(&amp;#039;&amp;#039;func&amp;#039;&amp;#039;, {{&amp;#039;}}&amp;#039;&amp;#039;funcName&amp;#039;&amp;#039;{{&amp;#039;}}, ...)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;callAssert&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;&amp;#039;&amp;#039;func&amp;#039;&amp;#039;(...)&amp;lt;/code&amp;gt; and checks if the first returned value evaluates to true. If it does, then it returns all the returned values. If not, it throws an error with a message in the form &amp;lt;code&amp;gt;{{&amp;#039;}}&amp;#039;&amp;#039;funcName&amp;#039;&amp;#039;(&amp;#039;&amp;#039;argument_values&amp;#039;&amp;#039;) failed&amp;#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
[[Turkum:Xatolarni boshqarish modullari]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 12:00:06 GMT</pubDate>
			<dc:creator>Programmer</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:CallAssert/doc</comments>
		</item>
</channel></rss>