Improving error messages in setup failure scenario

Inner exceptions are looped and output to provide richer error context
Error message text is not localized
This commit is contained in:
Louis DeJardin
2010-02-22 13:11:23 -08:00
parent 1cf3c51687
commit c555f05404

View File

@@ -132,7 +132,10 @@ namespace Orchard.Setup.Controllers {
return Redirect("~/"); return Redirect("~/");
} }
catch (Exception exception) { catch (Exception exception) {
_notifier.Error(T("Setup failed: " + exception.Message)); _notifier.Error(T("Setup failed:"));
for(var scan = exception; scan !=null; scan = scan.InnerException){
_notifier.Error(scan.Message);
}
return IndexViewResult(model); return IndexViewResult(model);
} }
} }