mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
#16692: Better stack trace when loading a module fails because the types cannot be exported.
--HG-- branch : dev
This commit is contained in:
@@ -77,7 +77,13 @@ namespace Orchard.Environment.Extensions {
|
||||
var featureId = featureDescriptor.Id;
|
||||
var extensionId = extensionDescriptor.Id;
|
||||
|
||||
var extensionEntry = _cacheManager.Get(extensionId, ctx => BuildEntry(extensionDescriptor));
|
||||
ExtensionEntry extensionEntry;
|
||||
try {
|
||||
extensionEntry = _cacheManager.Get(extensionId, ctx => BuildEntry(extensionDescriptor));
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new OrchardException(T("Error while loading extension '{0}'.", extensionId), ex);
|
||||
}
|
||||
if (extensionEntry == null) {
|
||||
// If the feature could not be compiled for some reason,
|
||||
// return a "null" feature, i.e. a feature with no exported types.
|
||||
|
Reference in New Issue
Block a user