add a guard against deserialization failure
This commit is contained in:
parent
e02d425aa5
commit
88116aaceb
|
@ -43,9 +43,17 @@
|
|||
(port-count-lines! port)
|
||||
(define first-line (read-line port))
|
||||
(define pos (file-position port))
|
||||
(list x
|
||||
(+ (string->number first-line) pos)
|
||||
(deserialize (read port)))))))))
|
||||
(define desed
|
||||
(with-handlers ([exn:fail? (λ (x)
|
||||
(log-warning "Failed to deserialize ~a: ~a"
|
||||
x
|
||||
(exn-message x))
|
||||
#f)])
|
||||
(deserialize (read port))))
|
||||
(and desed
|
||||
(list x
|
||||
(+ (string->number first-line) pos)
|
||||
desed))))))))
|
||||
|
||||
(define files->tag->offset #f)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user