9ee409716396
Safety first
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Tue, 25 Dec 2018 23:18:43 -0500 |
parents | 18f9292a0c6c |
children | 5a40b5b38fe3 |
branches/tags | (none) |
files | src/main.lisp |
Changes
--- a/src/main.lisp Tue Dec 25 23:17:13 2018 -0500 +++ b/src/main.lisp Tue Dec 25 23:18:43 2018 -0500 @@ -132,12 +132,18 @@ (defun write-row (row &optional (stream *standard-output*)) "Write `row` to `stream` as CSV data." + (check-type stream stream) + (assert (output-stream-p stream) (stream) + "Stream ~S is not an output stream." stream) (check-delimiter) (write-row% row stream *delimiter*) (values)) (defun write-rows (rows &optional (stream *standard-output*)) "Write `rows` to `stream` as CSV data." + (check-type stream stream) + (assert (output-stream-p stream) (stream) + "Stream ~S is not an output stream." stream) (check-delimiter) (loop :with delimiter = *delimiter* :for row :in rows