mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Gracefully handle `setlocale' errors at the REPL.
* module/ice-9/top-repl.scm (top-repl): Catch exceptions from `setlocale'. Reported by CRLF0710 <crlf0710@gmail.com>.
This commit is contained in:
parent
fb9cfa83a7
commit
94b55d3fa0
1 changed files with 8 additions and 1 deletions
|
@ -65,7 +65,14 @@
|
|||
(call-with-sigint
|
||||
(lambda ()
|
||||
(and (defined? 'setlocale)
|
||||
(setlocale LC_ALL ""))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(setlocale LC_ALL ""))
|
||||
(lambda (key subr fmt args errno)
|
||||
(format (current-error-port)
|
||||
"warning: failed to install locale: ~a~%"
|
||||
(strerror (car errno))))))
|
||||
|
||||
(let ((status (start-repl 'scheme)))
|
||||
(run-hook exit-hook)
|
||||
status)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue