YAY looking a lot better, need to do rest of filter error

This commit is contained in:
Peter Cottle 2012-12-25 18:27:50 -08:00
parent 01fb9ec25b
commit 82d9e7a223
5 changed files with 222 additions and 45 deletions

View file

@ -46,3 +46,16 @@ var GitError = exports.GitError = MyError.extend({
}
});
var filterError = function(err) {
if (err instanceof CommandProcessError ||
err instanceof GitError ||
err instanceof CommandResult ||
err instanceof Warning) {
// yay! one of ours
return;
} else {
throw err;
}
};
exports.filterError = filterError;