diff options
author | Thomas BrĂ¼derli | 2007-10-03 12:06:00 +0000 |
---|---|---|
committer | Thomas BrĂ¼derli | 2007-10-03 12:06:00 +0000 |
commit | 885ebe5a2144463ad080c084fcfbb1dac0f41dae (patch) | |
tree | 95d84d8a35616c692fd612407072f1d4ca5764b2 /itjs/boot.js | |
parent | f6f613a0a87a03a9bed4503eae38ba7fba76478c (diff) | |
download | itools-885ebe5a2144463ad080c084fcfbb1dac0f41dae.tar.gz itools-885ebe5a2144463ad080c084fcfbb1dac0f41dae.tar.bz2 itools-885ebe5a2144463ad080c084fcfbb1dac0f41dae.zip |
Avoid long error messages in URL param
Diffstat (limited to 'itjs/boot.js')
-rw-r--r-- | itjs/boot.js | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |