Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 53bbda5d
authored
Jul 16, 2016
by
Connor Hindley
Committed by
Mick Hansen
Jul 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return a rejected promise on commit or rollback errors (#6282)
1 parent
8a4f5280
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
lib/transaction.js
lib/transaction.js
View file @
53bbda5
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment