diff --git a/scheme/ikarus.conditions.ss b/scheme/ikarus.conditions.ss index b11d8b9..56d45f4 100644 --- a/scheme/ikarus.conditions.ss +++ b/scheme/ikarus.conditions.ss @@ -336,18 +336,21 @@ (display name p)) (let ([v (record-type-field-names rtd)]) (case (vector-length v) + [(0) (newline p)] [(1) (display ": " p) - (write ((record-accessor rtd 0) x) p)] + (write ((record-accessor rtd 0) x) p) + (newline p)] [else + (display ":\n" p) (let f ([i 0]) (unless (= i (vector-length v)) - (display " " p) + (display " " p) (display (vector-ref v i) p) - (display "=" p) + (display ": " p) (write ((record-accessor rtd i) x) p) - (f (+ i 1))))])) - (newline p))) + (newline) + (f (+ i 1))))])))) (define (print-condition x p) (cond [(condition? x) diff --git a/scheme/psyntax.library-manager.ss b/scheme/psyntax.library-manager.ss index a6d4851..7d2b287 100644 --- a/scheme/psyntax.library-manager.ss +++ b/scheme/psyntax.library-manager.ss @@ -116,12 +116,28 @@ (make-parameter (lambda (x) (let ((str (library-name->file-name x))) - (let f ((ls (library-path))) - (and (pair? ls) - (let ((name (string-append (car ls) str))) - (if (file-exists? name) - name - (f (cdr ls)))))))) + (let f ((ls (library-path)) (failed-list '())) + (cond + ((null? ls) + (let () + (define-condition-type &library-resolution &condition + make-library-resolution-condition + library-resolution-condition? + (library condition-library) + (files condition-files)) + (raise + (condition + (make-error) + (make-who-condition 'expander) + (make-message-condition + "cannot locate library in library-path") + (make-library-resolution-condition + x (reverse failed-list)))))) + (else + (let ((name (string-append (car ls) str))) + (if (file-exists? name) + name + (f (cdr ls) (cons name failed-list))))))))) (lambda (f) (if (procedure? f) f