/// <inheritdoc />
        public void Handle(Exception error, ErrorSeverityLevel severity)
        {
            if (error == null)
            {
                throw new ArgumentNullException(nameof(error));
            }

            var errorContext = new ErrorHandlingContext(this, severity, error);

            errorHandlingStrategy.Handle(errorContext);

            errorContext.RethrowErrorIfNotHandled();
        }
 /// <summary>
 /// Initialize a new instance of the <see cref="ErrorHandlingContext"/> class.
 /// </summary>
 /// <param name="source">The source where the exception was caught.</param>
 /// <param name="severity">The severity of the error.</param>
 /// <param name="error">The error which occurred.</param>
 public ErrorHandlingContext(object source, ErrorSeverityLevel severity, Exception error)
 {
     Source     = source ?? throw new ArgumentNullException(nameof(source));
     Severity   = severity;
     this.error = error ?? throw new ArgumentNullException(nameof(error));
 }