mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 23:37:00 +02:00
Fix the condition handler fix for #40.
Refrain from trying to display the character where we found a decoding error when the error actually happens at end-of-input-in-character...
This commit is contained in:
parent
56f3da28ed
commit
654b3f5531
@ -78,7 +78,13 @@
|
|||||||
(pgstate-incf *state* (target mysql) :read 1)
|
(pgstate-incf *state* (target mysql) :read 1)
|
||||||
(funcall process-row-fn row))))
|
(funcall process-row-fn row))))
|
||||||
(handler-bind
|
(handler-bind
|
||||||
((babel-encodings:character-decoding-error
|
;; avoid trying to fetch the character at end-of-input position...
|
||||||
|
((babel-encodings:end-of-input-in-character
|
||||||
|
#'(lambda (c)
|
||||||
|
(pgstate-incf *state* (target mysql) :errs 1)
|
||||||
|
(log-message :error "~a" c)
|
||||||
|
(invoke-restart 'qmynd-impl::use-nil)))
|
||||||
|
(babel-encodings:character-decoding-error
|
||||||
#'(lambda (c)
|
#'(lambda (c)
|
||||||
(pgstate-incf *state* (target mysql) :errs 1)
|
(pgstate-incf *state* (target mysql) :errs 1)
|
||||||
(let ((encoding (babel-encodings:character-coding-error-encoding c))
|
(let ((encoding (babel-encodings:character-coding-error-encoding c))
|
||||||
|
Loading…
Reference in New Issue
Block a user