From ea97e9b5044156ac68d17b83ac603148940aec3e Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 20 Jan 2015 00:34:54 -0200 Subject: Hotfix with-demoted-errors in sx-compose-send, should Close #238 --- sx-compose.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sx-compose.el') 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." -- cgit v1.2.3