Skip to content
Snippets Groups Projects
Commit ee944999 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

more robust deprecation messages

parent 2bcca88a
No related branches found
No related tags found
No related merge requests found
......@@ -14,10 +14,12 @@ if ('function' === typeof jQuery && 'function' === typeof jQuery.noConflict) {
*/
function DEPRECATED(msg){
if(!window.console) return;
if(!arguments.callee) return;
if(!msg) msg = '';
var func = arguments.callee.caller.name;
var line = 'DEPRECATED function call '+func+'(). '+msg;
var func;
if(arguments.callee) func = arguments.callee.caller.name;
if(func) func = ' '+func+'()';
var line = 'DEPRECATED function call'+func+'. '+msg;
if(console.warn){
console.warn(line);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment