A variety of logging improvements to track down bugs (#1832)

* Log when we get a blocked numbers sync message

* Save three old signed keys in addition to the current active

* Remove the mystery from all the error-related log messages

* Log successful load of signed key - to help debug prekey errors

* removeSignedPreKey: Don't hang or crash in error cases

* Log on top-level unhandled promise rejection

* Remove trailing comma in param list, Electron 1.6 does not like

* Harden top-level error handler for strange object shapes
This commit is contained in:
Scott Nonnenberg 2017-11-30 11:56:29 -08:00 committed by GitHub
parent a5923c2177
commit 44da6924f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 10 deletions

View file

@ -161,6 +161,10 @@ window.log = {
};
window.onerror = function(message, script, line, col, error) {
window.log.error(error.stack);
const errorInfo = error && error.stack ? error.stack : JSON.stringify(error);
window.log.error('Top-level unhandled error: ' + errorInfo);
};
window.addEventListener('unhandledrejection', function(rejectionEvent) {
window.log.error('Top-level unhandled promise rejection: ' + rejectionEvent.reason);
});