Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery jQuery.readyException() method

jQuery jQuery.readyException() method

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods

Example

Pass the received error to console.error

jQuery

.

readyException

=

function

(

error

)

{

console

.

error

(

error

)

;

}

;


Definition and Usage

The $.readyException() function handles errors thrown synchronously by functions wrapped in jQuery().

**Note:** 1. This method is triggered when a function wrapped in jQuery() or jQuery( document ).ready(), or an equivalent function, throws an error synchronously. By default, it throws the error after a timeout so that it is logged in the console and passed to window.onerror.


Syntax

$

.readyException( error )

Parameters Description
error Error type: An error thrown by a function wrapped in jQuery()

jQuery Miscellaneous MethodsjQuery Miscellaneous Methods