Last modified: 2012-04-19 21:10:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32709, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30709 - Pass error info to error callbacks in mw.loader
Pass error info to error callbacks in mw.loader
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: 1.19.0 release
Assigned To: Krinkle
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-02 20:49 UTC by Michael Dale
Modified: 2012-04-19 21:10 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Pass error object to dependency loader error handler. Gives the loader calls error handler callback information about what when wrong and what module had the error. (650 bytes, patch)
2011-09-02 20:49 UTC, Michael Dale
Details

Description Michael Dale 2011-09-02 20:49:26 UTC
Created attachment 9006 [details]
Pass error object to dependency loader error handler. Gives the loader calls error handler callback information about what when wrong and what module had the error.

We should pass error info to loading decency error handlers. Patch attached.
Comment 1 Krinkle 2011-09-02 20:58:32 UTC
There is another call to error in mw.loader.using, 

			// If any dependencies have errors execute error immediately
			else if ( filter( ['error'], dependencies ).length ) {
				if ( $.isFunction( error ) ) {
					error();
				}
			}

Perhaps fix that one too.
Comment 2 Michael Dale 2011-09-02 22:22:50 UTC
Yes we should fix both. Also note that passing in module name is not so useful since the closure scope just gives you the last instance of module when the error is called ( rather than the module in which the error occurred ) ...
Comment 3 Sumana Harihareswara 2011-09-30 16:00:45 UTC
Added the "patch" and "need-review" keywords; Mark hopes to get someone to review the patch soon.
Comment 4 Michael Dale 2011-09-30 17:33:27 UTC
Krinkle should just directly commit some variation that handles the use cases discussed on IRC and this bug.
Comment 5 Krinkle 2011-10-02 17:12:47 UTC
OK. Assigning to self. Will do early next week.
Comment 6 Sumana Harihareswara 2011-12-23 19:21:36 UTC
Adding back the patch & need-review keywords since the patch still awaits review -- Timo, will you be getting to this in the next few months, or should we unassign it from you?
Comment 7 Krinkle 2011-12-27 02:44:36 UTC
Patch applied in r107358.

Also fixed it for another usage of error() that didn't pass any info.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links