[System.IO.Compression] Do not swallow inner exceptions in ZipArchive.
authorJoão Matos <joao@tritao.eu>
Wed, 27 May 2015 16:27:34 +0000 (17:27 +0100)
committerJoão Matos <joao@tritao.eu>
Wed, 27 May 2015 16:27:34 +0000 (17:27 +0100)
mcs/class/System.IO.Compression/ZipArchive.cs

index a1647a1256926599fde6202e29964fb8448c9774..feb5e1b705dec780327d9b62586094ac7bfc1faa 100644 (file)
@@ -106,8 +106,8 @@ namespace System.IO.Compression
                                zipFile = mode == ZipArchiveMode.Create ? 
                                        SharpCompress.Archive.Zip.ZipArchive.Create() :
                                        SharpCompress.Archive.Zip.ZipArchive.Open(stream);
-                       } catch (Exception) {
-                               throw new InvalidDataException("The contents of the stream are not in the zip archive format.");
+                       } catch (Exception e) {
+                               throw new InvalidDataException("The contents of the stream are not in the zip archive format.", e);
                        }
 
                        entries = new Dictionary<string, ZipArchiveEntry>();