made failure reason ob readLoop more obvious

This commit is contained in:
Jonathan Lamothe 2021-11-22 23:25:43 -05:00
parent 61fca70a5e
commit 7b8a887b3c

View File

@ -123,7 +123,7 @@ readLoop maxLen src =
Just bs -> do
let len = BS.length bs
when (len > maxLen) $
MaybeT $ return Nothing
fail "maximum length exceeded"
(byteString bs <>) <$> readLoop (maxLen - len) src
--jl