* boot-9.scm (%try-load): define using primitive-load. Previously
authorGary Houston <ghouston@arglist.com>
Tue, 24 Sep 1996 07:19:51 +0000 (07:19 +0000)
committerGary Houston <ghouston@arglist.com>
Tue, 24 Sep 1996 07:19:51 +0000 (07:19 +0000)
%try-load itself was the primitive.
(load-with-path): use scm-error instead of %load-announce-lossage.
Errors are thrown to 'misc-error instead of 'could-not-load.
(%load-announce-lossage): deleted.

ice-9/ChangeLog
ice-9/boot-9.scm

index f019625..7e39f67 100644 (file)
@@ -1,3 +1,11 @@
+Tue Sep 24 06:53:04 1996  Gary Houston  <ghouston@actrix.gen.nz>
+
+       * boot-9.scm (%try-load): define using primitive-load.  Previously
+       %try-load itself was the primitive.
+       (load-with-path): use scm-error instead of %load-announce-lossage.
+       Errors are thrown to 'misc-error instead of 'could-not-load.
+       (%load-announce-lossage): deleted.
+
 Mon Sep 23 00:16:31 1996  Mikael Djurfeldt  <mdj@kenneth>
 
        * boot-9.scm (warn, scm-style-repl): Use C printer instead of `print'.
index 8783b2f..072326f 100644 (file)
 ;;; {try-load}
 ;;;
 
+(define (%try-load file-name case-insensitive sharp)
+  (catch #t (lambda ()
+             (primitive-load file-name case-insensitive sharp)
+             #t)
+        (lambda args #f)))
+
 (define (try-load-with-path file-name path)
   (or-map (lambda (d)
            (let ((f (in-vicinity d file-name)))
          (newline)
          (force-output)))))
 
-(define (%load-announce-lossage file path)
-  (if %load-verbosely
-      (with-output-to-port (current-error-port)
-       (lambda ()
-         (display ";;; ")
-         (display (make-string %load-indent #\ ))
-         (display "...COULD NOT LOAD ")
-         (display file)
-         (display " from ")
-         (write path)
-         (newline)
-         (force-output))))
-  (throw 'could-not-load file path))
-
-
 (define (load-with-path name path)
   (define (do-load)
     (%load-announce name)
                             #t)
                           #f))
                     path))
-       (%load-announce-lossage name path)))
+       (scm-error 'misc-error #f "Could not load %S from %S"
+                  (list name path) #f)))
 
   (let ((indent %load-indent))
     (dynamic-wind