/// <summary> /// Raises the user exception. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="WorkerErrorEventArgs"/> instance containing the event data.</param> protected void RaiseUserException(object sender, WorkerErrorEventArgs e) { UserException?.Invoke(sender, e); }
/// <summary> /// Raises the system exception. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="WorkerErrorEventArgs"/> instance containing the event data.</param> private void RaiseSystemException(object sender, WorkerErrorEventArgs e) { SystemException?.Invoke(sender, e); }
/// <summary> /// Logs the system exception. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="WorkerErrorEventArgs"/> instance containing the event data.</param> protected void LogSystemException(object sender, WorkerErrorEventArgs e) { Log.ErrorException("Unhanded system exception", e.Error); }
/// <summary> /// Logs the user exception. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="WorkerErrorEventArgs"/> instance containing the event data.</param> protected void LogUserException(object sender, WorkerErrorEventArgs e) { Log.WarnException("User exception", e.Error); }
/// <summary> /// Logs the user exception. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="WorkerErrorEventArgs"/> instance containing the event data.</param> protected void LogUserException(object sender, WorkerErrorEventArgs e) { Log.LogError($"User exception{System.Environment.NewLine}{e.Error}"); }