summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-07-08 11:37:01 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-07-08 11:37:01 +0200
commitee94499951d43d07fa5822b968f594c1f5932613 (patch)
tree00b90a60159bc23a7b8c0ac478684f2cc5b2bde0
parent2bcca88a344ad5112322fb2533dceefb8757619a (diff)
downloadrpg-ee94499951d43d07fa5822b968f594c1f5932613.tar.gz
rpg-ee94499951d43d07fa5822b968f594c1f5932613.tar.bz2
more robust deprecation messages
-rw-r--r--lib/scripts/script.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index fc8cb6096..24473c2e6 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -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);