1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Move logs inside try block

This commit is contained in:
J. Ryan Stinnett
2019-04-09 16:40:13 +01:00
parent b0c3d0d2e3
commit b99243406b

View File

@@ -498,18 +498,18 @@ SyncApi.prototype.sync = function() {
debuglog("Checking server lazy load support...");
const supported = await client.doesServerSupportLazyLoading();
if (supported) {
debuglog("Creating and storing lazy load sync filter...");
try {
debuglog("Creating and storing lazy load sync filter...");
this.opts.filter = await client.createFilter(
Filter.LAZY_LOADING_SYNC_FILTER,
);
debuglog("Created and stored lazy load sync filter");
} catch (err) {
console.error(
"Creating and storing lazy load sync filter failed",
err,
);
}
debuglog("Created and stored lazy load sync filter");
} else {
debuglog("LL: lazy loading requested but not supported " +
"by server, so disabling");
@@ -534,13 +534,13 @@ SyncApi.prototype.sync = function() {
if (this.opts.lazyLoadMembers && this.opts.crypto) {
this.opts.crypto.enableLazyLoading();
}
debuglog("Storing client options...");
try {
debuglog("Storing client options...");
await this.client._storeClientOptions();
debuglog("Stored client options");
} catch (err) {
console.error("Storing client options failed", err);
}
debuglog("Stored client options");
getFilter(); // Now get the filter and start syncing
};