不要怂,就是干,撸起袖子干!

Commit 53bbda5d by Connor Hindley Committed by Mick Hansen

return a rejected promise on commit or rollback errors (#6282)

1 parent 8a4f5280
Showing with 2 additions and 2 deletions
......@@ -53,7 +53,7 @@ class Transaction {
commit() {
if (this.finished) {
throw new Error('Transaction cannot be committed because it has been finished with state: ' + this.finished);
return Utils.Promise.reject(new Error('Transaction cannot be committed because it has been finished with state: ' + this.finished));
}
this.$clearCls();
......@@ -79,7 +79,7 @@ class Transaction {
rollback() {
if (this.finished) {
throw new Error('Transaction cannot be rolled back because it has been finished with state: ' + this.finished);
return Utils.Promise.reject(new Error('Transaction cannot be rolled back because it has been finished with state: ' + this.finished));
}
this.$clearCls();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!