return window.opera;
}
-function exception_error_ext(location, e, ext_info) {
+function exception_error(location, e, ext_info) {
var msg = format_exception_error(location, e);
- var ebc = document.getElementById("xebContent");
disableHotkeys();
- if (ebc) {
-
- Element.show("dialog_overlay");
- Element.show("extendedErrorBox");
+ try {
- if (ext_info) {
- if (ext_info.responseText) {
- ext_info = ext_info.responseText;
+ var ebc = document.getElementById("xebContent");
+
+ if (ebc) {
+
+ Element.show("dialog_overlay");
+ Element.show("errorBoxShadow");
+
+ if (ext_info) {
+ if (ext_info.responseText) {
+ ext_info = ext_info.responseText;
+ }
}
+
+ ebc.innerHTML =
+ "<div><b>Error message:</b></div>" +
+ "<pre>" + msg + "</pre>" +
+ "<div><b>Additional information:</b></div>" +
+ "<textarea readonly=\"1\">" + ext_info + "</textarea>";
+
+ } else {
+ alert(msg);
}
- ebc.innerHTML =
- "<div><b>Error message:</b></div>" +
- "<pre>" + msg + "</pre>" +
- "<div><b>Additional information:</b></div>" +
- "<textarea readonly=\"1\">" + ext_info + "</textarea>";
-
- } else {
+ } catch (e) {
alert(msg);
- }
-}
-
-function exception_error(location, e, silent) {
- var msg = format_exception_error(location, e);
- if (!silent) {
- alert(msg);
}
+
}
function format_exception_error(location, e) {
debug("<b>all_counters_callback2 OUT: " + transport + "</b>");
} catch (e) {
- exception_error("all_counters_callback2", e);
+ exception_error("all_counters_callback2", e, transport);
}
}
try {
return parseInt(document.getElementById("FEEDU-" + id).innerHTML);
} catch (e) {
- exception_error("get_feed_unread", e, true);
return -1;
}
}
ctr = ctr.replace(")", "");
return parseInt(ctr);
} catch (e) {
- exception_error("get_feed_unread", e, true);
return -1;
}
}
function closeErrorBox() {
- if (Element.visible("extendedErrorBox")) {
+ if (Element.visible("errorBoxShadow")) {
Element.hide("dialog_overlay");
-
- Element.hide("extendedErrorBox");
+ Element.hide("errorBoxShadow");
enableHotkeys();
}
init_params[key] = value;
}
-function fatalError(code, message) {
+function fatalError(code, msg, ext_info) {
try {
if (code == 6) {
} else if (code == 5) {
window.location.href = "update.php";
} else {
- var fe = document.getElementById("fatal_error");
- var fc = document.getElementById("fatal_error_msg");
- if (message == "") message = "Unknown error";
+ if (msg == "") msg = "Unknown error";
- fc.innerHTML = "<img src='images/sign_excl.gif'> " + message + " (Code " + code + ")";
+ var ebc = document.getElementById("xebContent");
- fe.style.display = "block";
+ if (ebc) {
+
+ Element.show("dialog_overlay");
+ Element.show("errorBoxShadow");
+ Element.hide("xebBtn");
+
+ if (ext_info) {
+ if (ext_info.responseText) {
+ ext_info = ext_info.responseText;
+ }
+ }
+
+ ebc.innerHTML =
+ "<div><b>Error message:</b></div>" +
+ "<pre>" + msg + "</pre>" +
+ "<div><b>Additional information:</b></div>" +
+ "<textarea readonly=\"1\">" + ext_info + "</textarea>";
+ }
}
} catch (e) {
</div>
</div>
-
<div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
<?php rounded_table_start("hho"); ?>
<?php include "help/4.php" ?>
<ul id="debug_output" style='display : none'><li> </li></ul>
-<div id="fatal_error"><div id="fatal_error_inner">
- <h1>Fatal Error</h1>
- <div id="fatal_error_msg"><?php echo __('Unknown Error') ?></div>
-</div></div>
-
<div id="prefHeader">
<div class="topLinks">
<?php if (!SINGLE_USER_MODE) { ?>
<div id="notify" class="notify"><span id="notify_body"> </span></div>
<div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
+<div id="errorBoxShadow" style="display : none">
+ <div id="errorBox">
+ <div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div>
+ <div id="xebBtn" align='center'><input type="submit"
+ onclick="closeErrorBox()" value="Close this window"/></div>
+ </div>
+</div>
+
<div id="dialog_overlay" style="display : none"> </div>
<div id="prefFooter">
top : -4px;
}
-html>body #infoBox {
+div#errorBox {
+ background-color : #ffcccc;
+ border : 1px solid #ff0000;
+ font-size : 12px;
+ position: relative;
+ overflow : hidden;
+ left : -4px;
+ top : -4px;
+}
+
+
+html>body #infoBox, html>body #errorBox {
left : -10px;
top : -10px;
margin : 0;
}
-#infoBoxShadow:before, #infoBoxShadow:after {
+#infoBoxShadow:before, #infoBoxShadow:after,
+#errorBoxShadow:before, #errorBoxShadow:after {
content : " ";
display : block;
background : inherit;
height : 10px;
}
-#infoBoxShadow:before {
+#infoBoxShadow:before, #errorBoxShadow:before {
position : absolute;
top : 0;
right : 0;
background-position : right top;
}
-#infoBoxShadow:after {
+#infoBoxShadow:after, #errorBoxShadow:after {
margin : -10px 0 0 -10px;
background-position : left bottom;
}
-#infoBoxShadow {
+#infoBoxShadow, #errorBoxShadow {
background-image : url("images/shadow.png");
background-position : bottom right;
left : 25%;
top : 70px;
width : 50%;
- z-index : 5;
position : absolute;
- display : none;
min-width : 600px;
}
+#infoBoxShadow {
+ z-index : 5;
+}
+
+#errorBoxShadow {
+ z-index : 400;
+}
+
div.infoBoxContents {
padding : 10px;
margin-bottom : 5px;
margin : 10px;
}
-#fatal_error {
- background : white;
- left : 0;
- top : 0;
- height : 100%;
- width : 100%;
- z-index : 200;
- display : none;
- position : absolute;
-}
-
-#fatal_error_inner {
- font-weight : bold;
- margin : 10px;
- color : red;
-}
-
-#fatal_error_msg {
- color : black;
- padding : 10px;
- font-weight : normal;
- background-color : #ffcccc;
- border : 1px solid #ff0000;
-}
-
-#fatal_error_msg a {
- color : red;
-}
-
-#fatal_error_msg a:hover {
- color : red;
- text-decoration : underline;
-}
-
-#fatal_error_msg img {
- vertical-align : middle;
-}
-
#noDaemonWarning {
position : absolute;
background-color : #ecf4ff;
color : gray;
}
-div#extendedErrorBox {
- left : 25%;
- top : 70px;
- width : 50%;
- z-index : 999;
- position : absolute;
- min-width : 600px;
- background-color : #ffcccc;
- border : 1px solid #ff0000;
- font-size : 12px;
-}
-
-div#extendedErrorBox div#xebTitle {
+div#errorBox div#xebTitle {
background-color : #ff0000;
color : white;
padding : 4px 2px 4px 10px;
font-size : 12px;
}
-div#extendedErrorBox div#xebContent {
+div#errorBox div#xebContent {
font-size : 12px;
padding : 10px;
}
-div#extendedErrorBox textarea {
+div#errorBox textarea {
width : 100%;
height : 200px;
}
-div#extendedErrorBox input {
+div#errorBox input {
margin-bottom : 10px;
}
+
+
}
if (!transport.responseXML) {
- fatalError(3, "[D001, Received reply is not XML]: " + transport.responseText);
+ fatalError(3, "Sanity check: Received reply is not XML", transport.responseText);
return;
}
var reply = transport.responseXML.firstChild.firstChild;
if (!reply) {
- fatalError(3, "[D002, Invalid RPC reply]: " + transport.responseText);
+ fatalError(3, "Sanity check: invalid RPC reply", transport.responseText);
return;
}
init_second_stage();
} catch (e) {
- exception_error("backend_sanity_check_callback", e);
+ exception_error("backend_sanity_check_callback", e, transport);
}
}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <div id="extendedErrorBox" style="display : none">
- <div id="xebTitle">Fatal Exception</div>
- <div id="xebContent"> </div>
- <div align='center'>
- <input type="submit" onclick="closeErrorBox()" value="Close this window"/>
- </div>
- </div>
-
<script type="text/javascript">
//<![CDATA[
if (navigator.userAgent.match("Opera")) {
<div id="notify" class="notify"><span id="notify_body"> </span></div>
-<div id="fatal_error"><div id="fatal_error_inner">
- <h1>Fatal Error</h1>
- <div id="fatal_error_msg">Unknown Error</div>
-</div></div>
-
<div id="dialog_overlay" style="display : none"> </div>
<script type="text/javascript">
<ul id="debug_output" style='display : none'><li> </li></ul>
-<div id="infoBoxShadow"><div id="infoBox"> </div></div>
+<div id="infoBoxShadow" style="display : none"><div id="infoBox"> </div></div>
+
+<div id="errorBoxShadow" style="display : none">
+ <div id="errorBox">
+ <div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div>
+ <div id="xebBtn" align='center'><input type="submit"
+ onclick="closeErrorBox()" value="Close this window"/></div>
+ </div>
+</div>
<div id="header">
<div class="topLinks">
setTimeout(callback, 10);
}
} catch (e) {
- exception_error("catchup_callback2", e);
+ exception_error("catchup_callback2", e, transport);
}
}
remove_splash();
} catch (e) {
- exception_error_ext("headlines_callback2", e, transport);
+ exception_error("headlines_callback2", e, transport);
}
}
view_mode = document.forms['main_toolbar_form'].view_mode;
view_mode = view_mode[view_mode.selectedIndex].value;
} catch (e) {
- exception_error("showArticleInHeadlines/viewmode", e, true);
+ //
}
if (upd_img_pic && upd_img_pic.src.match("updated.png")) {
notify("");
} catch (e) {
- exception_error("article_callback2", e);
+ exception_error("article_callback2", e, transport);
}
}