From b25ba79490a22d22edf9088545fd15addb9890ca Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 13 Apr 2020 16:40:50 -0500 Subject: nicer error printing --- granolin.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/granolin.lisp b/granolin.lisp index 0fff9b4..583d46b 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -453,7 +453,7 @@ (url (format nil +join-room-path+ room-id))) (send (client url body :method :post :wrap make-basic-json) t ; do nothing in case of success - (format *error-output* "FAILED to join room: ~a.~%HTTP response: ~a ~a~%" + (format *error-output* "FAILED to join room: ~a.~%HTTP response: ~a ~a~%~%" room-id *response-status* (flexi-streams:octets-to-string *response-body*))))) @@ -476,7 +476,8 @@ :wrap make-basic-json :literal-body t) (getf (basic-json-data *response-object*) :|content_uri|) - (format *error-output* "FAILED to upload content.~%HTTP response: ~a ~a~%" + (format *error-output* "FAILED to upload content: ~a.~%HTTP response: ~a ~a~%~%" + filename *response-status* (flexi-streams:octets-to-string *response-body*))))) @@ -504,7 +505,7 @@ (unwind-protect (loop :while (running-p client) :do (handler-case (sync client) - (error (c) (format *error-output* "error: ~a" c)))) + (error (c) (format *error-output* "Error during Event Sync: ~a~%~%" c)))) (clean-up client))) (defun stop (client) -- cgit v1.2.3