From 692bebf6587739771bb9c9ebf9b0ddb52e0b9655 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Tue, 28 May 2013 19:34:41 +0100 Subject: [PATCH] Better message for supported types Changed exception message in Reader/Archive Factory to list the supported types. --- SharpCompress/Archive/ArchiveFactory.cs | 2 +- SharpCompress/Reader/ReaderFactory.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SharpCompress/Archive/ArchiveFactory.cs b/SharpCompress/Archive/ArchiveFactory.cs index 619c416f..b778b453 100644 --- a/SharpCompress/Archive/ArchiveFactory.cs +++ b/SharpCompress/Archive/ArchiveFactory.cs @@ -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) diff --git a/SharpCompress/Reader/ReaderFactory.cs b/SharpCompress/Reader/ReaderFactory.cs index 52dbfeab..e336f2cb 100644 --- a/SharpCompress/Reader/ReaderFactory.cs +++ b/SharpCompress/Reader/ReaderFactory.cs @@ -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"); } } } \ No newline at end of file