]> git.wh0rd.org - tt-rss.git/commitdiff
print additional info on fatalError(3)
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 20 Feb 2006 04:29:52 +0000 (05:29 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 20 Feb 2006 04:29:52 +0000 (05:29 +0100)
error.php
functions.js
tt-rss.js

index cc57b64dba291f6099a293f560d4ab3652d01647..8c5a6a4b5efb761148197b6ec1e0392c3da84604 100644 (file)
--- a/error.php
+++ b/error.php
                
                <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>
index 8d59bd32100fb34d4f0853882a341f22dee8f5ff..26db6bb5f0891e649195640c38051b13019c2d70 100644 (file)
@@ -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) {
index 4deac445623b3bd3bb22c56efa17dd314e065ed7..758db77153c324260a02d55f1b5bb5375f571fb7 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -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;
                        }