Skip to content

Commit

Permalink
(GH-584) Do not error if unable to load type
Browse files Browse the repository at this point in the history
If unable to load a licensed type, do not throw an error.
  • Loading branch information
ferventcoder committed Feb 12, 2016
1 parent f30c1dc commit 6871d6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static void Main(string[] args)
license.AssemblyLoaded = true;
license.Assembly = licensedAssembly;
license.Version = VersionInformation.get_current_informational_version(licensedAssembly);
Type licensedComponent = licensedAssembly.GetType(ApplicationParameters.LicensedComponentRegistry, throwOnError: true, ignoreCase: true);
Type licensedComponent = licensedAssembly.GetType(ApplicationParameters.LicensedComponentRegistry, throwOnError: false, ignoreCase: true);
SimpleInjectorContainer.add_component_registry_class(licensedComponent);
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ private static void set_licensed_options(ChocolateyConfiguration config, Chocola
{
if (license.AssemblyLoaded)
{
Type licensedConfigBuilder = license.Assembly.GetType(ApplicationParameters.LicensedConfigurationBuilder, throwOnError: true, ignoreCase: true);
Type licensedConfigBuilder = license.Assembly.GetType(ApplicationParameters.LicensedConfigurationBuilder, throwOnError: false, ignoreCase: true);

if (licensedConfigBuilder == null)
{
Expand Down

0 comments on commit 6871d6e

Please sign in to comment.