mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-23 23:45:14 +00:00
Better message for supported types
Changed exception message in Reader/Archive Factory to list the supported types.
This commit is contained in:
@@ -54,7 +54,7 @@ namespace SharpCompress.Archive
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
return GZipArchive.Open(stream, options);
|
||||
}
|
||||
throw new InvalidOperationException("Cannot determine compressed stream type.");
|
||||
throw new InvalidOperationException("Cannot determine compressed stream type. Supported Archive Formats: Zip, GZip, Tar, Rar, 7Zip");
|
||||
}
|
||||
|
||||
public static IArchive Create(ArchiveType type)
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace SharpCompress.Reader
|
||||
return RarReader.Open(rewindableStream, options);
|
||||
}
|
||||
|
||||
throw new InvalidOperationException("Cannot determine compressed stream type.");
|
||||
throw new InvalidOperationException("Cannot determine compressed stream type. Supported Reader Formats: Zip, GZip, BZip2, Tar, Rar");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user