mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
fixing some more bugs
This commit is contained in:
parent
8ebb53b983
commit
94db9a3c7d
6 changed files with 37 additions and 11 deletions
16
src/git.js
16
src/git.js
|
@ -692,7 +692,21 @@ GitEngine.prototype.dispatch = function(command, callback) {
|
|||
});
|
||||
|
||||
command.set('status', 'processing');
|
||||
this[command.get('method') + 'Starter']();
|
||||
try {
|
||||
this[command.get('method') + 'Starter']();
|
||||
} catch (err) {
|
||||
if (err instanceof GitError ||
|
||||
err instanceof CommandResult) {
|
||||
|
||||
// short circuit animation by just setting error and returning
|
||||
command.set('error', err);
|
||||
callback();
|
||||
return;
|
||||
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO (get rid of)
|
||||
for (var i = 0; i < 3; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue