@@ -33,11 +33,11 @@ #import "OFInflateStream.h" #import "OFInflate64Stream.h" #import "crc32.h" -#import "OFChecksumFailedException.h" +#import "OFChecksumMismatchException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFOpenItemFailedException.h" @@ -816,12 +816,20 @@ _CRC32 = of_crc32(_CRC32, buffer, ret); if (_toRead == 0) { _atEndOfStream = true; - if (~_CRC32 != [_entry CRC32]) - @throw [OFChecksumFailedException exception]; + if (~_CRC32 != [_entry CRC32]) { + OFString *actualChecksum = [OFString stringWithFormat: + @"%08" PRIX32, ~_CRC32]; + OFString *expectedChecksum = [OFString stringWithFormat: + @"%08" PRIX32, [_entry CRC32]]; + + @throw [OFChecksumMismatchException + exceptionWithActualChecksum: actualChecksum + expectedChecksum: expectedChecksum]; + } } return ret; }