summaryrefslogtreecommitdiff
path: root/itjs/boot.js
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2007-09-10 10:01:58 +0000
committerThomas BrĂ¼derli2007-09-10 10:01:58 +0000
commit0d050f9631d411cd4bdec0a26a9d005349464395 (patch)
tree651271c61f062969da4796822101d0c30fd41cc4 /itjs/boot.js
parentda11d93152ef0d6e562856029cb11b12f8b8b7d6 (diff)
downloaditools-0d050f9631d411cd4bdec0a26a9d005349464395.tar.gz
itools-0d050f9631d411cd4bdec0a26a9d005349464395.tar.bz2
itools-0d050f9631d411cd4bdec0a26a9d005349464395.zip
Flags to locate script errors
Diffstat (limited to 'itjs/boot.js')
-rw-r--r--itjs/boot.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/itjs/boot.js b/itjs/boot.js
index 311f28e..32c8578 100644
--- a/itjs/boot.js
+++ b/itjs/boot.js
@@ -20,6 +20,11 @@ function it_catcherr(msg, url, line)
}
}
+ if (typeof it_boot.sequence != 'undefined')
+ stacktrace += "it_boot=" + it_boot.sequence + ";";
+ if (typeof window.it_loader != 'undefined')
+ stacktrace += "it_loader=" + it_loader.sequence + ";";
+
it_boot_report(msg, url, line, stacktrace);
return !window.env || !!window.env.is_live_server; // No env or live server -> suppress error
@@ -87,6 +92,8 @@ function it_boot_init()
function it_boot(file, isretry)
{
+ it_boot.sequence = isretry ? "r" : "b";
+
try
{
var loader = new XMLHttpRequest();
@@ -112,11 +119,14 @@ function it_boot(file, isretry)
{
if (loader.responseText.length && loader.responseText.lastIndexOf('it_boot_init()') > 0)
{
+ it_boot.sequence += "e";
var code = "try {" + loader.responseText + "} catch (e) { it_boot_report('Script exec error', '-', -1, e); }"; // Wrapped in try/catch as Konqueror does not support window.onerror
if (window.execScript)
window.execScript(code, "javascript"); // IE work-around to get script executed in global scope
else
window.setTimeout(code, 0); // Standard compliant version
+
+ window.setTimeout('it_boot.sequence = "";', 50);
}
else
error = "Incomplete script load @ status " + loader.status;