<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.quasar-rce.com/index.php?action=history&amp;feed=atom&amp;title=Vendetta%2FAPI%2Fblock_trap</id>
	<title>Vendetta/API/block trap - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.quasar-rce.com/index.php?action=history&amp;feed=atom&amp;title=Vendetta%2FAPI%2Fblock_trap"/>
	<link rel="alternate" type="text/html" href="https://wiki.quasar-rce.com/index.php?title=Vendetta/API/block_trap&amp;action=history"/>
	<updated>2026-04-07T09:28:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.quasar-rce.com/index.php?title=Vendetta/API/block_trap&amp;diff=22&amp;oldid=prev</id>
		<title>Wikiadmin: Created block_trap</title>
		<link rel="alternate" type="text/html" href="https://wiki.quasar-rce.com/index.php?title=Vendetta/API/block_trap&amp;diff=22&amp;oldid=prev"/>
		<updated>2025-03-03T06:37:01Z</updated>

		<summary type="html">&lt;p&gt;Created block_trap&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Definition ===&lt;br /&gt;
lib.block_trap (id, version, run_func) :: nil&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
Catches errors caused when running the given function and modifies the calling mod&amp;#039;s state.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
# string id: name of the mod to be activated, or the INI file&lt;br /&gt;
# string version: version of the mod to be activated, or ignored if the ID is an INI file.&lt;br /&gt;
# run_func: the function to trap errors from&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
# nil&lt;br /&gt;
&lt;br /&gt;
=== Other notes ===&lt;br /&gt;
* This function is a ‘lazy pcall alternative’; effectively, combining pcall on the given function with lib.update_state on the calling plugin. If the pcall errors out, the owning plugin will be marked as having errored out.&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
	</entry>
</feed>