From 885ebe5a2144463ad080c084fcfbb1dac0f41dae Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Wed, 3 Oct 2007 12:06:00 +0000 Subject: Avoid long error messages in URL param --- itjs/boot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'itjs/boot.js') diff --git a/itjs/boot.js b/itjs/boot.js index 2efa18a..aaa0321 100644 --- a/itjs/boot.js +++ b/itjs/boot.js @@ -37,12 +37,12 @@ function it_boot_addparam(url, param) return url + (url.match(/\?/) ? "&" : "?") + param; } -function it_panic(msg) +function it_panic(reason, msg) { if (!document.location.href.match(/[?&]static=/)) // Avoid loop - window.setTimeout("document.location.href = it_boot_addparam(document.location.href, 'static=" + msg + "')", 500); + window.setTimeout("document.location.href = it_boot_addparam(document.location.href, 'static=" + reason + "')", 500); - return it_boot_report('panic ' + msg, '-', -1, ''); + return it_boot_report('panic ' + reason, '-', -1, (msg ? msg : '')); } function it_boot_report(msg, file, line, more) @@ -134,7 +134,7 @@ function it_boot(file, isretry) if (error) { if (isretry) - it_panic('load: ' + error); + it_panic('load', error); else it_boot(file, true); } -- cgit v1.2.3