From 730c4b061fc5799c626506283da3810475341199 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 8 Feb 2009 23:38:06 -0700 Subject: [PATCH] Improve debugging message --- imp/js/src/DimpCore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imp/js/src/DimpCore.js b/imp/js/src/DimpCore.js index 11a484270..e90f26c39 100644 --- a/imp/js/src/DimpCore.js +++ b/imp/js/src/DimpCore.js @@ -23,7 +23,7 @@ DimpCore = { debug: function(label, e) { if (!this.is_logout && DIMP.conf.debug) { - alert(label + ': ' + (e instanceof Error ? e.name + '-' + e.message : Object.inspect(e)) + (e.lineNumber ? ' (Line #' + e.lineNumber + ')' : '')); + alert(label + ': ' + ((e instanceof Error && e.name && e.message) ? e.name + '-' + e.message : Object.inspect(e)) + (e.lineNumber ? ' (Line #' + e.lineNumber + ')' : '')); } }, -- 2.11.0