Commit 5445a10e authored by Him188's avatar Him188

Fix

parent 78933701
......@@ -76,6 +76,7 @@ inline fun <R> Input.debugIfFail(name: String = "", onFail: (ByteArray) -> ByteR
try {
return block(it.toReadPacket(0, count))
} catch (e: Throwable) {
onFail(it.take(count).toByteArray()).readAvailable(it)
DebugLogger.debug("Error in ByteReadPacket $name=" + it.toUHexString(offset = 0, length = count))
throw e
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment