mirror of
https://github.com/dimitri/pgloader.git
synced 2026-01-29 11:01:06 +01:00
Improve threads error handling.
See #328 where we are lacking useful stack trace in a --debug run because of the previous talk-handler-bind coding, that was there to avoid sinking the users into too many details. Let's try another approach here.
This commit is contained in:
parent
b2ec66c84b
commit
4e36bd3c55
@ -151,7 +151,13 @@
|
||||
(lq:make-queue :fixed-capacity *concurrent-batches*))))
|
||||
|
||||
(with-stats-collection ((target copy) :dbname (db-name (target-db copy)))
|
||||
(lp:task-handler-bind () ;; ((error #'lp:invoke-transfer-error))
|
||||
(lp:task-handler-bind
|
||||
((error #'(lambda (condition)
|
||||
(log-message :error "A thread failed with error: ~a"
|
||||
condition)
|
||||
(if (member *client-min-messages* (list :debug :data))
|
||||
(lp::invoke-debugger condition)
|
||||
(lp::invoke-transfer-error condition)))))
|
||||
(log-message :info "COPY ~s" table-name)
|
||||
|
||||
;; start a task to read data from the source into the queue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user