From 09f2008f3e8bbcac455ddf4581f5754b296c6edf Mon Sep 17 00:00:00 2001 From: RubenWillems Date: Wed, 28 May 2014 11:38:25 +0200 Subject: [PATCH] Throw exception if package is not found. This makes it more clear when a config error is made. On a config error (package name not correct) one gets 'package removed' iso 'package not found' --- .../WebDashboard/Plugins/Administration/PackageManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/project/WebDashboard/Plugins/Administration/PackageManager.cs b/project/WebDashboard/Plugins/Administration/PackageManager.cs index f7d3691c0..a55d07971 100644 --- a/project/WebDashboard/Plugins/Administration/PackageManager.cs +++ b/project/WebDashboard/Plugins/Administration/PackageManager.cs @@ -101,7 +101,11 @@ public List InstallPackage(string fileName) fileName); FileInfo packageDetails = new FileInfo(packagePath); List 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();