Преглед на файлове

Catch errors while trying to compile plugins.

A warning with the full error message will be printed and the original
file `LOAD`ed instead.  If the error isn't related to the `fasl` file
output, then the `LOAD` should also throw an error, at which point the
normal error handling would take place.
Olof-Joachim Frahm преди 10 години
родител
ревизия
68ee3c942d
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      src/config.lisp

+ 5 - 1
src/config.lisp

@@ -53,7 +53,11 @@
53 53
          (plugin-package (sym)
54 54
            (format nil "~:@(coleslaw-~A~)" sym)))
55 55
     (let ((file (plugin-path name)))
56
-      (load (compile-file file :verbose nil :print nil) :verbose t))
56
+      (multiple-value-bind (output-file error)
57
+          (ignore-errors (compile-file file :verbose nil :print nil))
58
+        (when error
59
+          (warn "Error while compiling plugin ~A: ~A.~%" name error))
60
+        (load (or output-file file) :verbose t)))
57 61
     (let ((package (find-package (plugin-package name))))
58 62
       (apply (find-symbol "ENABLE" package) args))))
59 63