1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Fixed bad connection handling in synchronizer

This commit is contained in:
Laurent Cozic
2017-07-10 00:20:38 +01:00
parent dc4eb35fca
commit fdeb797750
6 changed files with 34 additions and 19 deletions

View File

@@ -74,6 +74,15 @@ class Synchronizer {
this.logger().info('Total folders: ' + folderCount);
this.logger().info('Total notes: ' + noteCount);
this.logger().info('Total resources: ' + resourceCount);
if (report.errors.length) {
this.logger().warn('There was some errors:');
for (let i = 0; i < report.errors.length; i++) {
let e = report.errors[i];
let msg = e && e.message ? e.message : JSON.stringify(e);
this.logger().warn(msg);
}
}
}
randomFailure(options, name) {
@@ -136,6 +145,7 @@ class Synchronizer {
noteConflict: 0,
state: this.state(),
errors: [],
};
try {
@@ -397,8 +407,8 @@ class Synchronizer {
}
}
} catch (error) {
report.errors.push(error);
this.logger().error(error);
throw error;
}
if (this.cancelling()) {