mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 09:20:03 +02:00
fixed error parsing issue
This commit is contained in:
parent
51bed71e1b
commit
543f5986ae
3 changed files with 17 additions and 8 deletions
|
@ -31,11 +31,9 @@ var Command = Backbone.Model.extend({
|
||||||
this.parse();
|
this.parse();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof CommandProcessError ||
|
if (err instanceof CommandProcessError ||
|
||||||
err instanceof GitError) {
|
err instanceof GitError ||
|
||||||
this.set('status', 'error');
|
err instanceof CommandResult) {
|
||||||
this.set('error', err);
|
// erroChanged() will handle status and all of that
|
||||||
} else if (err instanceof CommandResult) {
|
|
||||||
this.set('status', 'finished');
|
|
||||||
this.set('error', err);
|
this.set('error', err);
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw err;
|
||||||
|
@ -44,13 +42,17 @@ var Command = Backbone.Model.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
errorChanged: function(model, err) {
|
errorChanged: function(model, err) {
|
||||||
this.set('err', err);
|
if (err instanceof CommandProcessError ||
|
||||||
|
err instanceof GitError) {
|
||||||
this.set('status', 'error');
|
this.set('status', 'error');
|
||||||
|
} else if (err instanceof CommandResult) {
|
||||||
|
this.set('status', 'finished');
|
||||||
|
}
|
||||||
this.formatError();
|
this.formatError();
|
||||||
},
|
},
|
||||||
|
|
||||||
formatError: function() {
|
formatError: function() {
|
||||||
this.set('result', this.get('err').toResult());
|
this.set('result', this.get('error').toResult());
|
||||||
},
|
},
|
||||||
|
|
||||||
getShortcutMap: function() {
|
getShortcutMap: function() {
|
||||||
|
|
|
@ -143,6 +143,7 @@ var CommandView = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
this.model.toJSON()
|
this.model.toJSON()
|
||||||
);
|
);
|
||||||
|
console.log('rendering', this.model.toJSON());
|
||||||
|
|
||||||
this.$el.html(this.template(json));
|
this.$el.html(this.template(json));
|
||||||
return this;
|
return this;
|
||||||
|
|
6
todo.txt
6
todo.txt
|
@ -1,3 +1,9 @@
|
||||||
SAFE calling on tree animation -- so it will update when necessary (AnimationArbiter class)
|
SAFE calling on tree animation -- so it will update when necessary (AnimationArbiter class)
|
||||||
|
|
||||||
|
Real refs -- by putting in labels and background box and everything. also highlight with head
|
||||||
|
|
||||||
|
The Tree.Snapshot() idea
|
||||||
|
|
||||||
|
closures on animations
|
||||||
|
|
||||||
|
you name it!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue