Skip to main content

Bug Tracker

Side navigation

#14852 closed bug (invalid)

Opened March 06, 2014 06:50AM UTC

Closed March 20, 2014 10:01PM UTC

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

Reported by: liwenhua@huawei.com Owned by: liwenhua@huawei.com
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:
Description

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

Attachments (0)
Change History (2)

Changed March 06, 2014 01:29PM UTC by dmethvin comment:1

owner: → liwenhua@huawei.com
status: newpending

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

Changed March 20, 2014 10:01PM UTC by trac-o-bot comment:2

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!