Commit 380d677a authored by Eric Timmons's avatar Eric Timmons
Browse files

Print better errors in groveler

parent bbf7df9f
......@@ -96,14 +96,16 @@
:loaded-systems ,(gethash source-file *directly-loaded-systems*))))
(defun call-with-error-handling (thunk)
(values (funcall thunk) nil nil)
(asdf:missing-component (c)
(values nil nil (string-downcase (string (asdf/find-component:missing-requires c)))))
(error (c)
(handler-bind ((asdf:missing-component
(lambda (c)
(return-from call-with-error-handling
(values nil nil (string-downcase (string (asdf/find-component:missing-requires c)))))))
(error (lambda (c)
(return-from call-with-error-handling
(values nil (with-output-to-string (s)
(uiop:print-condition-backtrace c :stream s))
(values (funcall thunk) nil nil)))
(defmacro with-error-handling (nil &body body)
`(call-with-error-handling (lambda () ,@body)))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment