Don't crash if CHANGESET_REQ fails

pull/2039/head
Marcel Klehr 2013-12-17 16:20:57 +01:00
parent d1cad04647
commit adf05576b2
2 changed files with 6 additions and 2 deletions

View File

@ -203,7 +203,11 @@ Pad.prototype.getInternalRevisionAText = function getInternalRevisionAText(targe
{
curRev++;
var cs = changesets[curRev];
try{
atext = Changeset.applyToAText(cs, atext, apool);
}catch(e) {
return callback(e)
}
}
callback(null);

View File

@ -1255,7 +1255,7 @@ function handleChangesetRequest(client, message)
//build the requested rough changesets and send them back
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;
data.requestID = message.data.requestID;