Be more judicious in our showing of errors

Don't show an error banner for any uncaught JS exception, as often the app
will continue to work fine, and there's no way to dismiss it other than
reloading the page.

Also, don't show a transient "could not connect to humbug" error if
the check-for-messages-in-narrow request fails.

(imported from commit 2c634ba088b58c17fa5b2e3353b0589d40b8e357)
This commit is contained in:
Leo Franchi
2013-06-10 17:47:22 -04:00
parent 5b4493926f
commit 71e14674aa
2 changed files with 2 additions and 4 deletions

View File

@@ -127,7 +127,7 @@ exports.wrap_function = function blueslip_wrap_function(func) {
message += ":" + ex.lineNumber; message += ":" + ex.lineNumber;
} }
} }
report_error(message, ex.stack, {show_ui_msg: true}); report_error(message, ex.stack);
throw ex; throw ex;
} }
}; };
@@ -288,8 +288,7 @@ exports.error = function blueslip_error (msg, more_info) {
exports.fatal = function blueslip_fatal (msg, more_info) { exports.fatal = function blueslip_fatal (msg, more_info) {
if (! page_params.debug_mode) { if (! page_params.debug_mode) {
report_error(msg, Error().stack, {show_ui_msg: true, report_error(msg, Error().stack, {more_info: more_info});
more_info: more_info});
} }
throw new BlueslipError(msg, more_info); throw new BlueslipError(msg, more_info);

View File

@@ -729,7 +729,6 @@ function maybe_add_narrowed_messages(messages, msg_list) {
}, },
error: function (xhr) { error: function (xhr) {
// We might want to be more clever here // We might want to be more clever here
$('#connection-error').show();
setTimeout(function () { setTimeout(function () {
if (msg_list === current_msg_list) { if (msg_list === current_msg_list) {
// Don't actually try again if we unnarrowed // Don't actually try again if we unnarrowed