From 321b078ca5be33d2add66611c73e57c2e9b98d8b Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 13 Apr 2020 16:41:19 -0500 Subject: nicer error printing --- posterbot.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/posterbot.lisp b/posterbot.lisp index 2d2c652..c354154 100644 --- a/posterbot.lisp +++ b/posterbot.lisp @@ -81,7 +81,9 @@ the downloaded file. If there is an error thrown at any point, returns NIL." (file-stream (drakma:http-request link :want-stream t))) (loop :for bytes = (read-sequence buffer file-stream) :while (plusp bytes) :do (write-sequence buffer out)))) - (error () nil))) + (error (c) (progn + (format *error-output* "While downloading image file at ~a.~%Encountered Error: ~a~%~%" link c) + nil)))) (defun filename-from-link (link) -- cgit v1.2.3