diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-20 00:34:54 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-20 00:45:37 -0200 |
commit | ea97e9b5044156ac68d17b83ac603148940aec3e (patch) | |
tree | 54243dc4257d9c30a2d54dc06927673f0cc806e1 /sx-compose.el | |
parent | c53aa1d833a3f8b4b2b51636f7bd8283b968baa0 (diff) |
Hotfix with-demoted-errors in sx-compose-send, should Close #238
Diffstat (limited to 'sx-compose.el')
-rw-r--r-- | sx-compose.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sx-compose.el b/sx-compose.el index 3047a97..eb5e2eb 100644 --- a/sx-compose.el +++ b/sx-compose.el @@ -140,10 +140,15 @@ contents to the API, then calls `sx-compose-after-send-functions'." (interactive) (when (run-hook-with-args-until-failure 'sx-compose-before-send-hook) - (let ((result (funcall sx-compose--send-function))) - (with-demoted-errors - (run-hook-with-args 'sx-compose-after-send-functions - (current-buffer) result))))) + (let ((result (funcall sx-compose--send-function)) + (buf (current-buffer))) + (run-hook-wrapped + 'sx-compose-after-send-functions + (lambda (func) + (with-demoted-errors + "[sx] Error encountered AFTER sending post, but the post was sent successfully: %s" + (funcall func buf result)) + nil))))) (defun sx-compose-insert-tags () "Prompt for a tag list for this draft and insert them." |