sync error: Don't log the exception twice

If we have e.stack, then it will include the description of the exception.
This commit is contained in:
Richard van der Hoff
2016-03-17 12:05:01 +00:00
parent 963eaf7ec7
commit eaf3fe16eb
+3 -1
View File
@@ -519,7 +519,9 @@ SyncApi.prototype._sync = function(syncOptions) {
self._processSyncResponse(syncToken, data);
}
catch (e) {
console.error("Caught /sync error", e, e.stack);
// log the exception with stack if we have it, else fall back
// to the plain description
console.error("Caught /sync error", e.stack || e);
}
// emit synced events