[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: ui: Do not call 'display-error' for SRFI-34 exceptions.
From: |
Ludovic Courtès |
Subject: |
02/03: ui: Do not call 'display-error' for SRFI-34 exceptions. |
Date: |
Sun, 31 May 2015 20:40:01 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 23185ceadcb522c702cde28be2b5a7379d4ee9f1
Author: Ludovic Courtès <address@hidden>
Date: Sun May 31 21:54:28 2015 +0200
ui: Do not call 'display-error' for SRFI-34 exceptions.
* guix/ui.scm (report-load-error, warn-about-load-error, read/eval): Add
clause for SRFI-34 exceptions.
---
guix/ui.scm | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index 2140c2e..94e2c4e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -229,6 +229,8 @@ ARGS is the list of arguments received by the 'throw'
handler."
(let ((loc (source-properties->location properties)))
(format (current-error-port) (_ "~a: error: ~a~%")
(location->string loc) message)))
+ (('srfi-34 obj)
+ (report-error (_ "exception thrown: ~s~%") obj))
((error args ...)
(report-error (_ "failed to load '~a':~%") file)
(apply display-error frame (current-error-port) args))))
@@ -244,6 +246,9 @@ exiting. ARGS is the list of arguments received by the
'throw' handler."
(let ((loc (source-properties->location properties)))
(format (current-error-port) (_ "~a: warning: ~a~%")
(location->string loc) message)))
+ (('srfi-34 obj)
+ (warning (_ "failed to load '~a': exception thrown: ~s~%")
+ file obj))
((error args ...)
(warning (_ "failed to load '~a':~%") file)
(apply display-error #f (current-error-port) args))))
@@ -450,6 +455,8 @@ interpreted."
(match args
(('syntax-error proc message properties form . rest)
(report-error (_ "syntax error: ~a~%") message))
+ (('srfi-34 obj)
+ (report-error (_ "exception thrown: ~s~%") obj))
((error args ...)
(apply display-error #f (current-error-port) args))
(what? #f))