ExceptionService unexpected behavior

Topics: Issues / bugs
Jan 8, 2013 at 2:29 PM
Edited Jan 8, 2013 at 2:29 PM

Hi, i use the following code to handle exceptions in my application. but in this way the exception first goes in visual studio (Unhandled exception) and then if i press Continue the Messagebox will be shown.


var serviceLocator = ServiceLocator.Default;

serviceLocator.RegisterType<IExceptionService, ExceptionService>();
serviceLocator.RegisterType<IMessageService, MessageService>();
var exceptionService = serviceLocator.ResolveType<IExceptionService>();
var messageService = serviceLocator.ResolveType<IMessageService>();
exceptionService.Register<DbUpdateException>(exception => messageService.Show("Error"));


i use exception service in this way:


private void OnDeleteExecute()
       var exceptionService = GetService<IExceptionService>();
       var messageService = GetService<IMessageService>();
       if (messageService.Show(SR.GlobalMessagesResource.AreYouSureToDelete, SR.ControlsResource.Warning, MessageButton.YesNo, MessageImage.Question) == MessageResult.Yes)
           exceptionService.Process(() =>
Jan 10, 2013 at 7:36 PM

This is because you have break on all exceptions to true. Therefore visual studio breaks on it, but it will still work, right?