mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Packaging: Fixing that trying to install a package that doesn't exist should display a relevant error notification, fixes #6533
This commit is contained in:
committed by
Benedek Farkas
parent
759f50c5c0
commit
f692fc36a9
@@ -54,7 +54,9 @@ namespace Orchard.Packaging.Services {
|
||||
var packageVersion = String.IsNullOrEmpty(version) ? null : new Version(version);
|
||||
var package = packageRepository.FindPackage(packageId, packageVersion);
|
||||
if (package == null) {
|
||||
throw new ArgumentException(T("The specified package could not be found, id:{0} version:{1}", packageId, String.IsNullOrEmpty(version) ? T("No version").Text : version).Text);
|
||||
var message = T("The specified package could not be found: ID: {0}, version: {1}.",
|
||||
packageId, string.IsNullOrEmpty(version) ? T("No version").Text : version);
|
||||
throw new OrchardException(message);
|
||||
}
|
||||
|
||||
return InstallPackage(package, packageRepository, location, applicationPath);
|
||||
|
||||
Reference in New Issue
Block a user