<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=UnhandledRejection</id>
	<title>UnhandledRejection - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=UnhandledRejection"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=UnhandledRejection&amp;action=history"/>
	<updated>2026-07-24T23:08:35Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=UnhandledRejection&amp;diff=15501&amp;oldid=prev</id>
		<title>imported&gt;Koprawiki в 18:38, 3 сентября 2025</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=UnhandledRejection&amp;diff=15501&amp;oldid=prev"/>
		<updated>2025-09-03T18:38:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ClientsideJsFunction}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
{{Parameters}}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;promise&amp;#039;&amp;#039;&amp;#039;: Promise that was rejected and not handled, it is of &amp;#039;&amp;#039;&amp;#039;Promise&amp;lt;any&amp;gt;&amp;#039;&amp;#039;&amp;#039; type.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039;: Error of the promise that was rejected, it is of &amp;#039;&amp;#039;&amp;#039;any&amp;#039;&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
{{Example}}&lt;br /&gt;
The example below cancels the default error message box on client unhandled promise rejection and prints to the F11 console instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
mp.events.add(&amp;#039;unhandledRejection&amp;#039;, (promise, error) =&amp;gt; {&lt;br /&gt;
    // Print the message to F11 console or do whatever you need with it&lt;br /&gt;
    mp.console.logError(`[unhandledRejection]: ${JSON.stringify(promise)} ${error}`);&lt;br /&gt;
&lt;br /&gt;
    // Cancel the event to prevent default error message box&lt;br /&gt;
    return true; &lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
==See also==&lt;br /&gt;
{{Player_events_clientside}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Koprawiki</name></author>
	</entry>
</feed>