mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
YAY looking a lot better, need to do rest of filter error
This commit is contained in:
parent
01fb9ec25b
commit
82d9e7a223
5 changed files with 222 additions and 45 deletions
|
@ -77,15 +77,9 @@ var Command = Backbone.Model.extend({
|
|||
try {
|
||||
this.parse();
|
||||
} catch (err) {
|
||||
if (err instanceof CommandProcessError ||
|
||||
err instanceof GitError ||
|
||||
err instanceof CommandResult ||
|
||||
err instanceof Warning) {
|
||||
// errorChanged() will handle status and all of that
|
||||
this.set('error', err);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
Errors.filterError(err);
|
||||
// errorChanged() will handle status and all of that
|
||||
this.set('error', err);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -184,6 +178,9 @@ var Command = Backbone.Model.extend({
|
|||
throw new CommandResult({msg: ""});
|
||||
}
|
||||
|
||||
str = GitCommands.expandShortcut(str);
|
||||
this.set('rawStr', str);
|
||||
|
||||
// then check if it's one of our sandbox commands
|
||||
_.each(this.getSandboxCommands(), function(tuple) {
|
||||
var regex = tuple[0];
|
||||
|
@ -194,9 +191,6 @@ var Command = Backbone.Model.extend({
|
|||
}
|
||||
});
|
||||
|
||||
str = GitCommands.expandShortcut(str);
|
||||
this.set('rawStr', str);
|
||||
|
||||
// see if begins with git
|
||||
if (str.slice(0,3) !== 'git') {
|
||||
throw new CommandProcessError({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue