ironfede / openmcdf

Microsoft Compound File .net component - pure C# - netstandard 2.0
Mozilla Public License 2.0
302 stars 73 forks source link

System.ArgumentOutOfRangeException when trying to open certain invalid files #38

Closed Numpsy closed 5 years ago

Numpsy commented 5 years ago

Hi, Not sure what the official situation is with exception types, but for what it's worth, both of the files in the attached ArgumentOutOfRangeException.zip cause a System.ArgumentOutOfRangeException to be thrown if you try to load them with OpenMCDF, was wondering if that should really be a CFCorruptedFileException or CFException or some such?

ironfede commented 5 years ago

Fixed in current main branch. Added CFCorruptedException and CFException wrappers for uploaded cases. Thank you @Numpsy