Fix errors counting, see #313.

It came pretty obvious that the error counting was broken, it happens
that I forgot to pass the information down to the state handling parts
of the code.

In passing improve and fix CSV parse errors counting and fatal errors
reporting.
This commit is contained in:
Dimitri Fontaine 2015-11-27 11:51:48 +01:00
parent 533a49a261
commit af9e423f0b
2 changed files with 3 additions and 1 deletions

View File

@ -71,6 +71,7 @@
(handler-bind ((cl-csv:csv-parse-error
#'(lambda (c)
(log-message :error "~a" c)
(update-stats :data (target csv) :errs 1)
(cl-csv::continue))))
(cl-csv:read-csv stream
:row-fn process-fn
@ -84,6 +85,6 @@
:newline (csv-newline csv)))
(condition (e)
(progn
(log-message :error "~a" e)
(log-message :fatal "~a" e)
(update-stats :data (target csv) :errs 1)))))

View File

@ -220,6 +220,7 @@
:read (update-stats-read event)
:rows (update-stats-rows event)
:secs (update-stats-secs event)
:errs (update-stats-errs event)
:rs (update-stats-rs event)
:ws (update-stats-ws event)))