From cdaa9cb65482eaca5a8eafbbe7b3bec9fb157512 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 30 Dec 2006 06:09:34 +0000 Subject: [PATCH] r11412: warn on empty files -- occurs when subsetting UMLS --- create-sql.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/create-sql.lisp b/create-sql.lisp index ab7d64a..d145ad9 100644 --- a/create-sql.lisp +++ b/create-sql.lisp @@ -295,13 +295,10 @@ This is much faster that using create-umls-db-insert." (incf translated-lines))) (dolist (input-ufile input-ufiles) (with-umls-ufile (line input-ufile) - (incf input-lines) - (when (> input-lines translated-lines) - (throw 'done-counting 'incomplete))))) + (incf input-lines) + (when (> input-lines translated-lines) + (throw 'done-counting 'incomplete))))) (cond - ((eql input-lines 0) - (error "Input lines is 0") - nil) ((< input-lines translated-lines) (format t "Translated file ~A incomplete, deleting...~%" output-path) (delete-file output-path) @@ -309,6 +306,9 @@ This is much faster that using create-umls-db-insert." ((eql input-lines translated-lines) (format t "Translated file ~A already exists: skipping...~%" output-path) t) + ((eql input-lines 0) + (warn "The number of input lines is 0 for output file ~A." output-path) + nil) ((> translated-lines input-lines) (error "Shouldn't happen. Translated lines of ~A is ~D, greater than input lines ~D" output-path translated-lines input-lines) -- 2.34.1