From 2b454083c640ad93a1adb7cf135885b54c0986f6 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 17 Apr 2006 02:02:26 +0000 Subject: [PATCH] Fixed error messages. --- epg.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/epg.el b/epg.el index 77d445b..9a5f46e 100644 --- a/epg.el +++ b/epg.el @@ -855,7 +855,8 @@ If PLAIN is nil, it returns the result as a string." (epg-start-decrypt context (epg-make-data-from-file cipher)) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Decryption failed")) + (error "Decrypt failed: %S" + (epg-context-result-for context 'error))) (unless plain (epg-read-output context))) (unless plain @@ -875,7 +876,8 @@ If PLAIN is nil, it returns the result as a string." (epg-start-decrypt context (epg-make-data-from-file input-file)) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Decryption failed")) + (error "Decrypt failed: %S" + (epg-context-result-for context 'error))) (epg-read-output context)) (epg-delete-output-file context) (if (file-exists-p input-file) @@ -1017,7 +1019,8 @@ Otherwise, it makes a normal signature." (epg-start-sign context (epg-make-data-from-file plain) mode) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Sign failed")) + (error "Sign failed: %S" + (epg-context-result-for context 'error))) (unless signature (epg-read-output context))) (unless signature @@ -1037,7 +1040,8 @@ Otherwise, it makes a normal signature." (epg-start-sign context (epg-make-data-from-string plain) mode) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Sign failed")) + (error "Sign failed: %S" + (epg-context-result-for context 'error))) (epg-read-output context)) (epg-delete-output-file context) (epg-reset context))) @@ -1095,7 +1099,8 @@ If RECIPIENTS is nil, it performs symmetric encryption." recipients sign always-trust) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Encrypt failed")) + (error "Encrypt failed: %S" + (epg-context-result-for context 'error))) (unless cipher (epg-read-output context))) (unless cipher @@ -1115,7 +1120,8 @@ If RECIPIENTS is nil, it performs symmetric encryption." recipients sign always-trust) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Encrypt failed")) + (error "Encrypt failed: %S" + (epg-context-result-for context 'error))) (epg-read-output context)) (epg-delete-output-file context) (epg-reset context))) -- 1.7.10.4