Simplify exception handling in account list loader.
This commit is contained in:
parent
f2265de1b7
commit
a22aec695b
1 changed files with 6 additions and 9 deletions
|
@ -120,15 +120,12 @@
|
||||||
|
|
||||||
;; Reads the accounts list, returns '() upon error.
|
;; Reads the accounts list, returns '() upon error.
|
||||||
(define (load-accounts-list apikeys)
|
(define (load-accounts-list apikeys)
|
||||||
(call/cc
|
(handle-exceptions
|
||||||
(lambda (ret)
|
ex
|
||||||
(with-exception-handler
|
'()
|
||||||
(lambda (ex)
|
(map (compose car string-split)
|
||||||
(ret '()))
|
(read-lines
|
||||||
(lambda ()
|
(open-input-file apikeys)))))
|
||||||
(map (compose car string-split)
|
|
||||||
(read-lines
|
|
||||||
(open-input-file apikeys))))))))
|
|
||||||
|
|
||||||
;; Loads all accounts - it expects .csv files in given directory.
|
;; Loads all accounts - it expects .csv files in given directory.
|
||||||
(define (load-accounts accounts-list dir)
|
(define (load-accounts accounts-list dir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue