Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Wubben novemberborn

View GitHub Profile
@novemberborn
novemberborn / Deferred.js
Created Jun 7, 2012 — forked from mikewilcox/Deferred.js
Deferred Error Testing
View Deferred.js
require([
"dojo/Deferred"
], function(Deferred){
var useError = 0;
var getError = function(name, useThisError){
var msg = name + ' error';
if(useError || useThisError){
return function(e){ console.error(msg); d.reject(e); };
}
};