diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-02-14 00:20:28 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-02-14 00:20:28 +0100 |
commit | 6901878894e9c6405fa811c512a32f448e8b9fa2 (patch) | |
tree | 5b04c4234f4022533692c36a83047ec9801aada9 /guix/ui.scm | |
parent | baf766a7ff9db45c707b4539176f2143fbd90efd (diff) | |
parent | 58c6a93d9d60660d8425d8c52d4b73a42d4a5b55 (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'guix/ui.scm')
-rw-r--r-- | guix/ui.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/ui.scm b/guix/ui.scm index f0465519b6..2fc001d2eb 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -374,9 +374,16 @@ ARGS is the list of arguments received by the 'throw' handler." (report-error (G_ "exception thrown: ~s~%") obj)) (when (fix-hint? obj) (display-hint (condition-fix-hint obj)))) - ((error args ...) + ((key args ...) (report-error (G_ "failed to load '~a':~%") file) - (apply display-error frame (current-error-port) args)))) + (match args + (((? symbol? proc) (? string? message) (args ...) . rest) + (display-error frame (current-error-port) proc message + args rest)) + (_ + ;; Some exceptions like 'git-error' do not follow Guile's convention + ;; above and need to be printed with 'print-exception'. + (print-exception (current-error-port) frame key args)))))) (define (warn-about-load-error file args) ;FIXME: factorize with ↑ "Report the failure to load FILE, a user-provided Scheme file, without |