Skip to content

Commit

Permalink
Fix error reports for promise-done and promise-finally
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaro committed Apr 15, 2019
1 parent f237a52 commit 7ac038c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions promise-done.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
(promise-then self nil (lambda (err)
(run-at-time 0 nil
(lambda ()
(if (listp err)
(signal (car err) (cdr err))
(error err)))))))
(signal 'error (list err)))))))
nil)

(provide 'promise-done)
Expand Down
4 changes: 1 addition & 3 deletions promise-finally.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
(lambda (err)
(promise-then (promise-resolve (funcall f))
(lambda (_)
(if (consp err)
(signal (car err) (cdr err))
(error err)))))))
(promise-reject err))))))

(provide 'promise-finally)
;;; promise-finally.el ends here

0 comments on commit 7ac038c

Please sign in to comment.