dnauck / Portable.Licensing

Portable.Licensing is a cross platform software licensing framework which allows you to implement licensing into your application or library. It provides you all tools to create and validate licenses for your software.
http://dev.nauck-it.de/projects/portable-licensing
MIT License
592 stars 173 forks source link

Enhance the exception catch when license corrupted #52

Open LeiYangGH opened 5 years ago

LeiYangGH commented 5 years ago

Currently the library generates license file in xml format. If the user attempts to edit the license xml(chances are high when trial time ended), but finally corrupted the file to be invalid xml, then License.Load will get uncaught System.Xml.XmlException. It will be much better if catch the exception and return some type of IValidationFailure.