diff options
author | Andrew Dolgov <[email protected]> | 2006-02-20 05:29:52 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-02-20 05:29:52 +0100 |
commit | 91d612b39e1dcc3b25d707019a071506d08f9dd5 (patch) | |
tree | bdfa76de8eea585a1c0d3f93f78741e34f17f9d3 | |
parent | 2f3c902cdc9683457732ca831b0d9b359eb6e939 (diff) |
print additional info on fatalError(3)
-rw-r--r-- | error.php | 7 | ||||
-rw-r--r-- | functions.js | 9 | ||||
-rw-r--r-- | tt-rss.js | 4 |
3 files changed, 15 insertions, 5 deletions
@@ -62,7 +62,12 @@ <h1>Fatal Error</h1> - <div class="bigErrorMsg"><?= $ERRORS[$_GET["c"]] ?></div> + <div class="bigErrorMsg"><?= $ERRORS[$_GET["c"]] ?> + + <? if ($_GET["p"]) { ?> + <p><?= htmlspecialchars($_GET["p"]) ?></p> + <? } ?> + </div> </td> </tr> diff --git a/functions.js b/functions.js index 8d59bd321..26db6bb5f 100644 --- a/functions.js +++ b/functions.js @@ -524,8 +524,13 @@ function hideOrShowFeeds(doc, hide) { } -function fatalError(code) { - window.location = "error.php?c=" + param_escape(code); +function fatalError(code, params) { + if (!params) { + window.location = "error.php?c=" + param_escape(code); + } else { + window.location = "error.php?c=" + param_escape(code) + + "&p=" + param_escape(params); + } } function selectTableRow(r, do_select) { @@ -143,14 +143,14 @@ function backend_sanity_check_callback() { try { if (!xmlhttp.responseXML) { - fatalError(3); + fatalError(3, "D001;" + xmlhttp.responseText); return; } var reply = xmlhttp.responseXML.firstChild; if (!reply) { - fatalError(3); + fatalError(3, "D002;" + xmlhttp.responseText); return; } |