Skip to content

Commit

Permalink
Throw exception if package is not found. This makes it more clear whe…
Browse files Browse the repository at this point in the history
…n a config error is made.

On a config error (package name not correct) one gets 'package removed' iso 'package not found'
  • Loading branch information
RubenWillems committed May 28, 2014
1 parent 02dfd94 commit 09f2008
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -101,7 +101,11 @@ public List<PackageImportEventArgs> InstallPackage(string fileName)
fileName);
FileInfo packageDetails = new FileInfo(packagePath);
List<PackageImportEventArgs> events = null;
if (packageDetails.Exists)
if (!packageDetails.Exists)
{
throw new Exception(string.Format("Wanted package {0} not found in : {1}", fileName, ProgramDataFolder.MapPath("Packages")));
}
else
{
// Load the package and install it
events = new List<PackageImportEventArgs>();
Expand Down

0 comments on commit 09f2008

Please sign in to comment.