(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
(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)
(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
(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)))
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
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)))