* src/scm/bootstrap.scm.in (gnc:load): don't silently succeed on

load errors -- fail.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4733 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Rob Browning 2001-06-18 16:51:36 +00:00
parent 304b8d8c57
commit a70ef04176

View File

@ -185,32 +185,45 @@ string and 'directories' must be a list of strings."
(set! finished? #t)
(set! result file-name))))))
; (define (gnc:load name)
; "Name must be a string. The system attempts to locate the file of
; the given name and load it. The system will attempt to locate the
; file in all of the directories specified by gnc:*load-path*."
; (define (make-thunk file-name)
; (lambda () (primitive-load file-name) #t))
; (define (handler key . args)
; (apply display-error #f (current-error-port) args)
; #f)
; (let* ((path (if (list? gnc:*load-path*)
; gnc:*load-path*
; (gnc:config-var-value-get gnc:*load-path*)))
; (file-name (gnc:find-in-directories name path)))
; (if (not file-name)
; #f
; (if
; (catch #t (make-thunk file-name) handler)
; (begin
; (gnc:debug "loaded file " file-name)
; #t)
; (begin
; (gnc:warn "failure loading " file-name)
; #f)))))
(define (gnc:load name)
"Name must be a string. The system attempts to locate the file of
the given name and load it. The system will attempt to locate the
file in all of the directories specified by gnc:*load-path*."
(define (make-thunk file-name)
(lambda () (primitive-load file-name) #t))
(define (handler key . args)
(apply display-error #f (current-error-port) args)
#f)
(let* ((path (if (list? gnc:*load-path*)
gnc:*load-path*
(gnc:config-var-value-get gnc:*load-path*)))
(file-name (gnc:find-in-directories name path)))
(if (not file-name)
#f
(if
(catch #t (make-thunk file-name) handler)
(begin
(gnc:debug "loaded file " file-name)
#t)
(begin
(gnc:warn "failure loading " file-name)
#f)))))
(primitive-load file-name))))
(define (gnc:_expand-load-path_ new-path)
(let ((load-path-interpret