Merge pull request #2039 from ether/fix/dont-crash-on-failed-changeset_req
Don't crash if CHANGESET_REQ fails
This commit is contained in:
commit
af5b8d3e24
2 changed files with 6 additions and 2 deletions
|
@ -203,7 +203,11 @@ Pad.prototype.getInternalRevisionAText = function getInternalRevisionAText(targe
|
||||||
{
|
{
|
||||||
curRev++;
|
curRev++;
|
||||||
var cs = changesets[curRev];
|
var cs = changesets[curRev];
|
||||||
atext = Changeset.applyToAText(cs, atext, apool);
|
try{
|
||||||
|
atext = Changeset.applyToAText(cs, atext, apool);
|
||||||
|
}catch(e) {
|
||||||
|
return callback(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
callback(null);
|
callback(null);
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ function handleChangesetRequest(client, message)
|
||||||
//build the requested rough changesets and send them back
|
//build the requested rough changesets and send them back
|
||||||
getChangesetInfo(padIds.padId, start, end, granularity, function(err, changesetInfo)
|
getChangesetInfo(padIds.padId, start, end, granularity, function(err, changesetInfo)
|
||||||
{
|
{
|
||||||
ERR(err);
|
if(err) return console.error('Error while handling a changeset request for '+padIds.padId, err, message.data);
|
||||||
|
|
||||||
var data = changesetInfo;
|
var data = changesetInfo;
|
||||||
data.requestID = message.data.requestID;
|
data.requestID = message.data.requestID;
|
||||||
|
|
Loading…
Reference in a new issue