IExceptionPolicy concept and default implementation.

Updating EventBus and UnhandledExceptionFilter to use the exception policy.
Adding OrchardFatalException.
Updating text on default error page.
(Part II) Removing the unhandled "catch" from module controllers. If there are "expected" exceptions, move them closer to the APIs where they occur.
Removing ControllerExtensions.Error and refactoring.

--HG--
branch : 1.x
extra : transplant_source : %5C9a%E2%9A%F4%ACI%A3F%3C%D2%5C%CC%5C%9A.%E1%EF%3C
This commit is contained in:
Suha Can
2011-06-09 16:34:31 -07:00
parent d83d922a6b
commit 95c0ac69e6
23 changed files with 399 additions and 361 deletions

View File

@@ -9,7 +9,6 @@ using Orchard.Media.Models;
using Orchard.Media.Services;
using Orchard.Media.ViewModels;
using Orchard.UI.Notify;
using Orchard.Utility.Extensions;
namespace Orchard.Media.Controllers {
[ValidateInput(false)]
@@ -197,7 +196,7 @@ namespace Orchard.Media.Controllers {
try {
_mediaService.UploadMediaFile(viewModel.MediaPath, Request.Files[fileName], viewModel.ExtractZip);
}
catch (ArgumentException argumentException) {
catch (ArgumentException) {
Services.Notifier.Error(T("Uploading media file failed:"));
return View(viewModel);
}
@@ -277,7 +276,7 @@ namespace Orchard.Media.Controllers {
try {
_mediaService.RenameFile(viewModel.MediaPath, viewModel.Name, input["NewName"]);
}
catch (ArgumentException argumentException) {
catch (ArgumentException) {
Services.Notifier.Error(T("Editing media file failed."));
return EditMedia(viewModel);
}