From: Michael M Slusarz Date: Mon, 9 Feb 2009 06:38:06 +0000 (-0700) Subject: Improve debugging message X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=730c4b061fc5799c626506283da3810475341199;p=horde.git Improve debugging message --- 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 + ')' : '')); } },