Skip to content

Commit abe4769

Browse files
committed
jQuery.readyException: Add the page, add the 3.1 category
Fixes jquery#942 Closes jquery#946
1 parent ef3cc87 commit abe4769

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

categories.xml

+6
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,12 @@ var files = event.originalEvent.dataTransfer.files;
422422
<hr/>
423423
]]></desc>
424424
</category>
425+
<category name="Version 3.1" slug="3.1">
426+
<desc><![CDATA[
427+
<p><a href="/jQuery.readyException">jQuery.readyException</a> was added.</p>
428+
<hr/>
429+
]]></desc>
430+
</category>
425431
<category name="All" slug="all"/>
426432
</category>
427433
</categories>

entries/jQuery.readyException.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<entry type="method" name="jQuery.readyException" return="Selector">
3+
<title>jQuery.readyException()</title>
4+
<desc>Handles errors thrown synchronously in functions wrapped in <code>jQuery()</code>.</desc>
5+
<signature>
6+
<added>3.1</added>
7+
<argument name="error" type="Error">
8+
<desc>An error thrown in the function wrapped in <code>jQuery()</code>.</desc>
9+
</argument>
10+
</signature>
11+
<longdesc>
12+
<p>This method is fired when an error is thrown synchronously in a function wrapped in <code>jQuery()</code> or <code>jQuery( document ).ready()</code>, or equivalent. By default it re-throws the error in a timeout so that it's logged in the console and passed to <code>window.onerror</code> instead of being swallowed. Overwrite this method if you want to handle such errors differently.</p>
13+
</longdesc>
14+
<example>
15+
<desc>Pass the received error to <code>console.error</code>.</desc>
16+
<code><![CDATA[
17+
jQuery.readyException = function( error ) {
18+
console.error( error );
19+
};
20+
]]></code>
21+
</example>
22+
<category slug="core"/>
23+
<category slug="version/3.1"/>
24+
</entry>

0 commit comments

Comments
 (0)