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.
This commit is contained in:
Olof-Joachim Frahm 2014-12-02 21:29:29 +01:00
parent 9c4dd4162b
commit 68ee3c942d

View file

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