cleaned up error message and save prefs as text now

original commit: 7e3444f3be8f6521b2c7d361e4e5f13c9dfb8579
This commit is contained in:
Robby Findler 1997-05-19 16:51:21 +00:00
parent 449cafbff3
commit aed196dd52

View File

@ -175,15 +175,17 @@
(lambda (p) (lambda (p)
(mzlib:pretty-print:pretty-print (mzlib:pretty-print:pretty-print
(hash-table-map preferences marshall-pref) p)) (hash-table-map preferences marshall-pref) p))
'truncate) 'truncate 'text)
(mred:debug:printf 'prefs "saved user preferences")))) (mred:debug:printf 'prefs "saved user preferences"))))
(mred:exit:insert-exit-callback (mred:exit:insert-exit-callback
(lambda () (lambda ()
(with-handlers ((void (lambda (exn) (with-handlers ([(lambda (x) #t)
(lambda (exn)
(mred:gui-utils:message-box (mred:gui-utils:message-box
(format "exception raied while saving prefs: ~a" (format "error while saving prefs: ~a"
(exn-message exn)))))) (exn-message exn))
"Saving Prefs"))])
(save-user-preferences)))) (save-user-preferences))))
(define read-user-preferences (define read-user-preferences
@ -218,7 +220,8 @@
(wx:message-box (format "found bad pref: ~n~a" input) (wx:message-box (format "found bad pref: ~n~a" input)
"Preferences"))]) "Preferences"))])
(let loop ([input (call-with-input-file preferences-filename (let loop ([input (call-with-input-file preferences-filename
read)]) read
'text)])
(cond (cond
[(pair? input) [(pair? input)
(let/ec k (let/ec k