From a78fad958fa79f3d850e1b562254b817d949bed6 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Mon, 20 May 2013 10:30:37 -0700 Subject: [PATCH] Fixing warning messages --HG-- branch : 1.x --- .../ContentManagement/DefaultContentManagerTests.cs | 2 +- src/Orchard.Tests/DataMigration/DataMigrationTests.cs | 2 -- .../Orchard.MediaLibrary/Controllers/OEmbedController.cs | 2 +- src/Orchard/Data/Migration/DataMigrationManager.cs | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Orchard.Tests/ContentManagement/DefaultContentManagerTests.cs b/src/Orchard.Tests/ContentManagement/DefaultContentManagerTests.cs index 90461827c..2b3927b58 100644 --- a/src/Orchard.Tests/ContentManagement/DefaultContentManagerTests.cs +++ b/src/Orchard.Tests/ContentManagement/DefaultContentManagerTests.cs @@ -147,7 +147,7 @@ namespace Orchard.Tests.ContentManagement { _transaction.Dispose(); } - catch (Exception e) { + catch { } finally { _transaction = null; diff --git a/src/Orchard.Tests/DataMigration/DataMigrationTests.cs b/src/Orchard.Tests/DataMigration/DataMigrationTests.cs index ede3adc5c..fe6ab33b9 100644 --- a/src/Orchard.Tests/DataMigration/DataMigrationTests.cs +++ b/src/Orchard.Tests/DataMigration/DataMigrationTests.cs @@ -230,8 +230,6 @@ namespace Orchard.Tests.DataMigration { public int UpdateFrom1() { throw new Exception(); - - return 2; } public int UpdateFrom2() { diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs index b380171df..c0d1ef3ab 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/OEmbedController.cs @@ -64,7 +64,7 @@ namespace Orchard.MediaLibrary.Controllers { } } } - catch (Exception e) { + catch { return View(viewModel); } diff --git a/src/Orchard/Data/Migration/DataMigrationManager.cs b/src/Orchard/Data/Migration/DataMigrationManager.cs index 2c5ffd7c9..8155e01da 100644 --- a/src/Orchard/Data/Migration/DataMigrationManager.cs +++ b/src/Orchard/Data/Migration/DataMigrationManager.cs @@ -129,7 +129,7 @@ namespace Orchard.Data.Migration { _transactionManager.RequireNew(); } - catch (Exception e) { + catch { _transactionManager.Cancel(); }