mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 12:03:16 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user