public void HandleViewException(Exception exception, IErrorVisualizer errorVisualizer, string customErrorMessage, int eventId) { try { ILogger logger = GetLogger(exception); logger.LogToOperations(exception, eventId, EventLogEntryType.Error, customErrorMessage); EnsureErrorVisualizer(errorVisualizer, exception); errorVisualizer.ShowErrorMessage(customErrorMessage); } catch (ExceptionHandlingException) { throw; } catch (Exception handlingException) { this.ThrowExceptionHandlingException(handlingException, exception); } }
public void ShowFunctionalErrorMessage(string errorMessage, IErrorVisualizer errorVisualizer) { try { if (errorVisualizer == null) { throw new ArgumentNullException("errorVisualizer"); } ILogger logger = GetLogger(null); logger.TraceToDeveloper(errorMessage); errorVisualizer.ShowErrorMessage(errorMessage); } catch (ExceptionHandlingException) { throw; } catch (Exception handlingException) { this.ThrowExceptionHandlingException(handlingException, null); } }
public override void HandleViewException(Exception exception, IErrorVisualizer errorVisualizer) { errorVisualizer.ShowErrorMessage(exception.Message); }