fix typo of occured for logging messages and notification (#7083)

This commit is contained in:
adrian booth
2016-08-15 13:25:41 +01:00
committed by Sipke Schoorstra
parent 0deab6bd0d
commit 84288aeff6
25 changed files with 37 additions and 37 deletions

View File

@@ -168,7 +168,7 @@ namespace Lucene.Services {
writer.DeleteDocuments(query); writer.DeleteDocuments(query);
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Error(ex, "An unexpected error occured while removing the documents [{0}] from the index [{1}].", String.Join(", ", documentIds), indexName); Logger.Error(ex, "An unexpected error occurred while removing the documents [{0}] from the index [{1}].", String.Join(", ", documentIds), indexName);
} }
} }
} }

View File

@@ -172,8 +172,8 @@ namespace Orchard.Alias.Controllers {
} }
catch (Exception ex) { catch (Exception ex) {
Services.TransactionManager.Cancel(); Services.TransactionManager.Cancel();
Services.Notifier.Error(T("An error occured while creating the alias {0}: {1}. Please check the values are correct.", aliasPath, ex.Message)); Services.Notifier.Error(T("An error occurred while creating the alias {0}: {1}. Please check the values are correct.", aliasPath, ex.Message));
Logger.Error(ex, T("An error occured while creating the alias {0}", aliasPath).Text); Logger.Error(ex, T("An error occurred while creating the alias {0}", aliasPath).Text);
ViewBag.Path = aliasPath; ViewBag.Path = aliasPath;
ViewBag.Route = routePath; ViewBag.Route = routePath;
@@ -236,8 +236,8 @@ namespace Orchard.Alias.Controllers {
} }
catch (Exception ex) { catch (Exception ex) {
Services.TransactionManager.Cancel(); Services.TransactionManager.Cancel();
Services.Notifier.Error(T("An error occured while editing the alias '{0}': {1}. Please check the values are correct.", aliasPath, ex.Message)); Services.Notifier.Error(T("An error occurred while editing the alias '{0}': {1}. Please check the values are correct.", aliasPath, ex.Message));
Logger.Error(ex, T("An error occured while creating the alias '{0}'", aliasPath).Text); Logger.Error(ex, T("An error occurred while creating the alias '{0}'", aliasPath).Text);
ViewBag.Path = aliasPath; ViewBag.Path = aliasPath;
ViewBag.Route = routePath; ViewBag.Route = routePath;

View File

@@ -36,7 +36,7 @@ namespace Orchard.AntiSpam.Services {
return SpamStatus.Ham; return SpamStatus.Ham;
} }
catch(Exception e) { catch(Exception e) {
Logger.Error(e, "An error occured while checking for spam"); Logger.Error(e, "An error occurred while checking for spam");
return SpamStatus.Spam; return SpamStatus.Spam;
} }
} }
@@ -46,7 +46,7 @@ namespace Orchard.AntiSpam.Services {
var result = ExecuteValidateRequest(context, "submit-spam"); var result = ExecuteValidateRequest(context, "submit-spam");
} }
catch (Exception e) { catch (Exception e) {
Logger.Error(e, "An error occured while reporting spam"); Logger.Error(e, "An error occurred while reporting spam");
} }
} }
@@ -55,7 +55,7 @@ namespace Orchard.AntiSpam.Services {
var result = ExecuteValidateRequest(context, "submit-ham"); var result = ExecuteValidateRequest(context, "submit-ham");
} }
catch (Exception e) { catch (Exception e) {
Logger.Error(e, "An error occured while reporting ham"); Logger.Error(e, "An error occurred while reporting ham");
} }
} }

View File

@@ -141,7 +141,7 @@ namespace Orchard.Azure.Services.Caching.Output {
return Retry(function, times--); return Retry(function, times--);
} }
catch (Exception e) { catch (Exception e) {
Logger.Error(e, "An unexpected error occured while releasing a DataCacheFactory."); Logger.Error(e, "An unexpected error occurred while releasing a DataCacheFactory.");
return default(T); return default(T);
} }
} }

View File

@@ -134,7 +134,7 @@ namespace Orchard.Blogs.Commands {
Context.Output.WriteLine(T("Found {0} items", doc.Descendants("item").Count())); Context.Output.WriteLine(T("Found {0} items", doc.Descendants("item").Count()));
} }
catch (Exception ex) { catch (Exception ex) {
throw new OrchardException(T("An error occured while loading the feed at {0}.", FeedUrl), ex); throw new OrchardException(T("An error occurred while loading the feed at {0}.", FeedUrl), ex);
} }
var blog = _blogService.Get(BlogId, VersionOptions.Latest); var blog = _blogService.Get(BlogId, VersionOptions.Latest);

View File

@@ -517,7 +517,7 @@ namespace Orchard.CodeGeneration.Commands {
File.SetLastWriteTime(solutionPath, DateTime.Now); File.SetLastWriteTime(solutionPath, DateTime.Now);
} }
catch { catch {
output.WriteLine(T("An unexpected error occured while trying to refresh the Visual Studio solution. Please reload it.")); output.WriteLine(T("An unexpected error occurred while trying to refresh the Visual Studio solution. Please reload it."));
} }
} }
} }

View File

@@ -241,7 +241,7 @@ namespace Orchard.Comments.Services {
_messageService.Send("Email", parameters); _messageService.Send("Email", parameters);
} }
catch(Exception e) { catch(Exception e) {
Logger.Error(e, "An unexpected error occured while sending a notification email"); Logger.Error(e, "An unexpected error occurred while sending a notification email");
} }
} }

View File

@@ -83,8 +83,8 @@ namespace Orchard.Indexing.Controllers {
Services.Notifier.Information(T("Index named {0} created successfully", id)); Services.Notifier.Information(T("Index named {0} created successfully", id));
} }
catch(Exception e) { catch(Exception e) {
Services.Notifier.Error(T("An error occured while creating the index: {0}", id)); Services.Notifier.Error(T("An error occurred while creating the index: {0}", id));
Logger.Error("An error occured while creatign the index " + id, e); Logger.Error("An error occurred while creatign the index " + id, e);
return View("Create", id); return View("Create", id);
} }

View File

@@ -288,7 +288,7 @@ namespace Orchard.Indexing.Services {
} }
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Warning(ex, "An error occured while adding a document to the index"); Logger.Warning(ex, "An error occurred while adding a document to the index");
} }
// removing documents from the index // removing documents from the index
@@ -299,7 +299,7 @@ namespace Orchard.Indexing.Services {
} }
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Warning(ex, "An error occured while removing a document from the index"); Logger.Warning(ex, "An error occurred while removing a document from the index");
} }
return true; return true;

View File

@@ -54,7 +54,7 @@ namespace Orchard.MediaProcessing.Shapes {
Output.Write(_imageProfileManager.Value.GetImageProfileUrl(Path, Profile, CustomFilter, ContentItem)); Output.Write(_imageProfileManager.Value.GetImageProfileUrl(Path, Profile, CustomFilter, ContentItem));
} }
catch (Exception ex) { catch (Exception ex) {
Logger.Error(ex, "An error occured while rendering shape {0} for image {1}", Profile, Path); Logger.Error(ex, "An error occurred while rendering shape {0} for image {1}", Profile, Path);
} }
} }

View File

@@ -82,7 +82,7 @@ namespace Orchard.MessageBus.Brokers.SqlServer {
} }
} }
catch(Exception e) { catch(Exception e) {
Logger.Error(e, "An error occured while creating a Worker."); Logger.Error(e, "An error occurred while creating a Worker.");
} }
} }

View File

@@ -72,7 +72,7 @@ namespace Orchard.MessageBus.Brokers.SqlServer {
} }
catch (Exception e) { catch (Exception e) {
Logger.Error(e, "An unexpected error occured while monitoring sql dependencies."); Logger.Error(e, "An unexpected error occurred while monitoring sql dependencies.");
} }
} }

View File

@@ -33,7 +33,7 @@ namespace Orchard.Migrations.Commands {
} }
} }
catch ( Exception ex ) { catch ( Exception ex ) {
throw new OrchardException(T("An error occured while upgrading the database."), ex); throw new OrchardException(T("An error occurred while upgrading the database."), ex);
} }
Context.Output.WriteLine(T("Database upgraded")); Context.Output.WriteLine(T("Database upgraded"));

View File

@@ -29,7 +29,7 @@ namespace Orchard.Migrations.Commands {
_schemaCommandGenerator.UpdateDatabase(); _schemaCommandGenerator.UpdateDatabase();
} }
catch ( Exception ex ) { catch ( Exception ex ) {
throw new OrchardException(T("An error occured while updating the database."), ex); throw new OrchardException(T("An error occurred while updating the database."), ex);
} }
Context.Output.WriteLine(T("Database updated")); Context.Output.WriteLine(T("Database updated"));
@@ -54,7 +54,7 @@ namespace Orchard.Migrations.Commands {
} }
} }
catch ( Exception ex ) { catch ( Exception ex ) {
throw new OrchardException(T("An error occured while creating the tables."), ex); throw new OrchardException(T("An error occurred while creating the tables."), ex);
} }
Context.Output.WriteLine(T("Tables created")); Context.Output.WriteLine(T("Tables created"));

View File

@@ -232,7 +232,7 @@ namespace Orchard.Modules.Controllers {
Services.Notifier.Information(T("The feature {0} was updated successfully", id)); Services.Notifier.Information(T("The feature {0} was updated successfully", id));
} }
catch (Exception exception) { catch (Exception exception) {
Services.Notifier.Error(T("An error occured while updating the feature {0}: {1}", id, exception.Message)); Services.Notifier.Error(T("An error occurred while updating the feature {0}: {1}", id, exception.Message));
} }
} }
break; break;

View File

@@ -619,7 +619,7 @@ namespace Orchard.OutputCache.Filters {
return cacheItem; return cacheItem;
} }
catch (Exception e) { catch (Exception e) {
Logger.Error(e, "An unexpected error occured while reading a cache entry"); Logger.Error(e, "An unexpected error occurred while reading a cache entry");
} }
return null; return null;

View File

@@ -63,7 +63,7 @@ namespace Orchard.Redis.MessageBus {
} }
catch (Exception e) { catch (Exception e) {
Logger.Error(e, "An error occured while subscribing to " + channel); Logger.Error(e, "An error occurred while subscribing to " + channel);
} }
} }

View File

@@ -128,7 +128,7 @@ namespace Orchard.Setup.Services {
using (var environment = bootstrapLifetimeScope.CreateWorkContextScope()) { using (var environment = bootstrapLifetimeScope.CreateWorkContextScope()) {
// Check if the database is already created (in case an exception occured in the second phase). // Check if the database is already created (in case an exception occurred in the second phase).
var schemaBuilder = new SchemaBuilder(environment.Resolve<IDataMigrationInterpreter>()); var schemaBuilder = new SchemaBuilder(environment.Resolve<IDataMigrationInterpreter>());
var installationPresent = true; var installationPresent = true;
try { try {

View File

@@ -249,8 +249,8 @@ namespace Orchard.Themes.Controllers {
Services.Notifier.Information(T("The theme {0} was updated successfully.", themeId)); Services.Notifier.Information(T("The theme {0} was updated successfully.", themeId));
Logger.Information("The theme {0} was updated successfully.", themeId); Logger.Information("The theme {0} was updated successfully.", themeId);
} catch (Exception exception) { } catch (Exception exception) {
Logger.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message).Text); Logger.Error(T("An error occurred while updating the theme {0}: {1}", themeId, exception.Message).Text);
Services.Notifier.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message)); Services.Notifier.Error(T("An error occurred while updating the theme {0}: {1}", themeId, exception.Message));
} }
return RedirectToAction("Index"); return RedirectToAction("Index");

View File

@@ -41,7 +41,7 @@ namespace Orchard.Warmup.Services {
return null; return null;
} }
catch(Exception e) { catch(Exception e) {
Logger.Error(e, "An error occured while downloading url: {0}", url); Logger.Error(e, "An error occurred while downloading url: {0}", url);
return null; return null;
} }
} }

View File

@@ -76,7 +76,7 @@ namespace Orchard.Data.Migration.Schema {
if (ex.IsFatal()) { if (ex.IsFatal()) {
throw; throw;
} }
throw new OrchardException(T("An unexpected error occured while executing the SQL statement: {0}", sql), ex); // Add the sql to the nested exception information throw new OrchardException(T("An unexpected error occurred while executing the SQL statement: {0}", sql), ex); // Add the sql to the nested exception information
} }
} }

View File

@@ -104,7 +104,7 @@ namespace Orchard.Environment {
throw; throw;
} }
Logger.Error(ex, "An unexpected error occured while terminating the Shell"); Logger.Error(ex, "An unexpected error occurred while terminating the Shell");
} }
} }
} }

View File

@@ -31,7 +31,7 @@ namespace Orchard.Exceptions.Filters {
} }
public void OnActionExecuted(ActionExecutedContext filterContext) { public void OnActionExecuted(ActionExecutedContext filterContext) {
// for exceptions which occured during the action execution // for exceptions which occurred during the action execution
// don't provide custom errors if the action has some custom code to handle exceptions // don't provide custom errors if the action has some custom code to handle exceptions
if (!filterContext.ActionDescriptor.GetCustomAttributes(typeof(HandleErrorAttribute), false).Any()) { if (!filterContext.ActionDescriptor.GetCustomAttributes(typeof(HandleErrorAttribute), false).Any()) {
@@ -92,7 +92,7 @@ namespace Orchard.Exceptions.Filters {
} }
public void OnResultExecuted(ResultExecutedContext filterContext) { public void OnResultExecuted(ResultExecutedContext filterContext) {
// for exceptions which occured during the action execution // for exceptions which occurred during the action execution
// don't provide custom errors if the action has some custom code to handle exceptions // don't provide custom errors if the action has some custom code to handle exceptions
if (!filterContext.ExceptionHandled && filterContext.Exception != null) { if (!filterContext.ExceptionHandled && filterContext.Exception != null) {

View File

@@ -31,7 +31,7 @@ namespace Orchard.FileSystems.LockFile {
return true; return true;
} }
catch { catch {
// an error occured while reading/creating the lock file // an error occurred while reading/creating the lock file
return false; return false;
} }
finally { finally {
@@ -46,7 +46,7 @@ namespace Orchard.FileSystems.LockFile {
return IsLockedImpl(path); return IsLockedImpl(path);
} }
catch { catch {
// an error occured while reading the file // an error occurred while reading the file
return true; return true;
} }
finally { finally {

View File

@@ -45,7 +45,7 @@ namespace Orchard.Messaging.Services {
if (ex.IsFatal()) { if (ex.IsFatal()) {
throw; throw;
} }
Logger.Error(ex, "An error occured while sending the message {0}", type); Logger.Error(ex, "An error occurred while sending the message {0}", type);
} }
} }
@@ -68,7 +68,7 @@ namespace Orchard.Messaging.Services {
if (ex.IsFatal()) { if (ex.IsFatal()) {
throw; throw;
} }
Logger.Error(ex, "An error occured while sending the message {0}", type); Logger.Error(ex, "An error occurred while sending the message {0}", type);
} }
} }