Skip to content

Commit eaa6bd5

Browse files
committed
Log SettingsService errors
1 parent 96bf793 commit eaa6bd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/FileHashGenerator/FileHashGenerator.Applications/Controllers/ModuleController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.ComponentModel;
44
using System.ComponentModel.Composition;
5+
using System.Diagnostics;
56
using System.Globalization;
67
using System.IO;
78
using System.Linq;
@@ -38,7 +39,7 @@ internal class ModuleController : IModuleController
3839

3940

4041
[ImportingConstructor]
41-
public ModuleController(IMessageService messageService, IFileDialogService fileDialogService, IEnvironmentService environmentService,
42+
public ModuleController(IMessageService messageService, IFileDialogService fileDialogService, ISettingsService settingsService, IEnvironmentService environmentService,
4243
ExportFactory<Sha512HashController> sha512HashControllerFactory, ExportFactory<Sha256HashController> sha256HashControllerFactory,
4344
ExportFactory<Sha1HashController> sha1HashControllerFactory, ExportFactory<MD5HashController> md5HashControllerFactory,
4445
Lazy<ShellViewModel> shellViewModel, Lazy<FileHashListViewModel> fileHashListViewModel, ExportFactory<AboutViewModel> aboutViewModelFactory)
@@ -56,6 +57,7 @@ public ModuleController(IMessageService messageService, IFileDialogService fileD
5657
this.fileHashListViewModel = fileHashListViewModel;
5758
this.aboutViewModelFactory = aboutViewModelFactory;
5859

60+
settingsService.ErrorOccurred += (sender, e) => Trace.TraceError("Error in SettingsService: {0}", e.Error);
5961
openCommand = new DelegateCommand(OpenFile);
6062
closeCommand = new DelegateCommand(CloseFile);
6163
aboutCommand = new DelegateCommand(ShowAboutView);

0 commit comments

Comments
 (0)