Angular Debugging Tips: Add Console to this method
</pre><pre name= "Code" class= "JavaScript" >
function Minerr (module, errorconstructor) {errorconstructor = Errorconstructor | |
Error;
return function () {var skip_indexes = 2; var Templateargs = arguments, code = templateargs[0], message = ' [' + (module? Module + ': ': '] + code + ']
', template = Templateargs[1], paramprefix, I; Message + + template.replace (/\{\d+\}/g, function (match) {var index = +match.slice (1,-1), Shiftedindex = in
Dex + skip_indexes;
if (Shiftedindex < templateargs.length) {return todebugstring (Templateargs[shiftedindex]);
return match;
});
Console.log (' Error message: ' + message ');
Message + = ' \nhttp://errors.angularjs.org/1.4.3/' + (module? Module + '/': ') + code; for (i = skip_indexes, Paramprefix = '? '; i < templateargs.length i++, Paramprefix = ' & ') {message + = param
Prefix + ' P ' + (i-skip_indexes) + ' = ' + encodeURIComponent (todebugstring (templateargs[i)); Return to new Errorconstructor (message);
}; }