Improve handling of errors when changing locale
In the load-new-guix-revision module.
This commit is contained in:
parent
3a79449974
commit
f118ed0bf9
1 changed files with 10 additions and 2 deletions
|
|
@ -265,14 +265,22 @@ WHERE job_id = $1"
|
|||
(messages-by-locale
|
||||
(filter-map
|
||||
(lambda (locale)
|
||||
(setlocale LC_MESSAGES locale)
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(setlocale LC_MESSAGES locale))
|
||||
(lambda (key . args)
|
||||
(error
|
||||
(simple-format
|
||||
#f
|
||||
"error changing locale to ~A: ~A ~A"
|
||||
locale key args))))
|
||||
(let ((message
|
||||
(lint-warning-message lint-warning)))
|
||||
(setlocale LC_MESSAGES source-locale)
|
||||
(if (string=? message source-message)
|
||||
#f
|
||||
(cons locale message))))
|
||||
(list ,@locales))))
|
||||
(setlocale LC_MESSAGES "")
|
||||
(cons (cons source-locale source-message)
|
||||
messages-by-locale))))
|
||||
(check package))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue