Hey :) I'm trying to do a (non-lisp) program that can control the process of compiling several lisp files. I would like to build some sort of structure in this program that can report all errors, warnings and notes for every file I tried to compile. And I'd like this program to do everything without user interaction. This means that I have to find a way to disable the debugger. I tried to use handler-case, but it seems to stop the compilation after the first error or warning I try to catch. the code would be something like this (defun my-compile (input output) (handler-case (compile-file input output) (error (err) (print "error")) (warning (wrn) (print "warning")))) When I do something like (format *standard-output* "Error: ~A" error) it actually invokes the debugger. So I can't find a way of getting the error message, preventing the debugger invocation and continuing compilation of the rest of the file. Ideally, I'd like to be able to do (my-compile "file1.lisp" "file1.out") (my-compile "file2.lisp" "file2.out") and get an output of the sort: Compiling "file1.lisp"... file1.lisp:21:error: "asd" isn't a symbol file1.lisp:320:warning: undefined symbol SUPER-SPECIAL Failed to compile "file1.lisp": 1 errors (and 1 warnings) Compiling "file2.lisp"... Successfuly compiled "file2.lisp": 0 warnings. Where "21" and "320" were the lines where the errors were located.
I'm not aware if the spec refers to the way error messages are suposed to be displayed, but I personally find cmucl's error reporting discouraging. If there is no way of doing this in today's cmucl, I would like to improve cmucl's error reporting.
