added a missing error check to scribble decoding
original commit: ecf45ab426b5215a71f31ffb223dfce7cadd66fd
This commit is contained in:
parent
d8f6292e36
commit
027d80e352
|
@ -189,10 +189,13 @@
|
|||
(part-to-collect part)
|
||||
(append para (part-blocks part))
|
||||
(cons (car l) (part-parts part))))]
|
||||
[(and (part-start? (car l))
|
||||
(or (not part-depth)
|
||||
((part-start-depth (car l)) . <= . part-depth)))
|
||||
(unless part-depth (error 'decode "misplaced part: ~e" (car l)))
|
||||
[(part-start? (car l))
|
||||
(unless part-depth
|
||||
(error 'decode "misplaced part; title: ~s" (part-start-title (car l))))
|
||||
(unless ((part-start-depth (car l)) . <= . part-depth)
|
||||
(error 'decode
|
||||
"misplaced part (the part is more than one layer deeper than its container); title: ~s"
|
||||
(part-start-title (car l))))
|
||||
(let ([s (car l)])
|
||||
(let loop ([l (cdr l)] [s-accum null])
|
||||
(if (or (null? l)
|
||||
|
|
Loading…
Reference in New Issue
Block a user