Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14852 closed bug (invalid)

jQuery done() function throw a excption but not enclosed within a try block

Reported by: liwenhua@… Owned by: liwenhua@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:


In jQuery version 1.7.2(line 7726) or 1.11.0 (line 9218), the done() function throw a excption but not enclosed within a try block.

try {
	state = 1;
	transport.send( requestHeaders, done );
} catch ( e ) {
        // Propagate exception as error if not done
	if ( state < 2 ) {
		done( -1, e );
	// Simply rethrow otherwise
	} else {
		throw e;	

when excute 'throw e', IE will turned error JS5022: Exception thrown and not caught.

Microsoft explain that "Exceptions that are thrown from within the try block using the throw statement are caught outside the try block by a catch statement." For more details, please check this pages. http://msdn.microsoft.com/en-us/library/xk40eh20(v=vs.90).aspx

Change History (2)

comment:1 Changed 9 years ago by dmethvin

Owner: set to liwenhua@…
Status: newpending

Please post a test case on jsFiddle.net showing how this is affecting your code.

comment:2 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.