/// <summary> /// Replaces the exception with the configured type for the specified policy. /// </summary> /// <param name="exception">The original exception.</param> /// <param name="policyName">The name of the <see cref="ExceptionPolicy"/>.</param> /// <param name="handlingInstanceID">The unique ID attached to the handling chain for this handling instance.</param> /// <returns>Modified exception to pass to the next handler in the chain.</returns> public override Exception HandleException(Exception exception, string policyName, Guid handlingInstanceID) { return(ReplaceException( exception, ReplaceExceptionType, ExceptionUtility.FormatExceptionMessage(ExceptionMessage, handlingInstanceID))); }
/// <summary> /// Replaces the exception with the configured type for the specified policy. /// </summary> /// <param name="exception">The original exception.</param> /// <param name="handlingInstanceId">The unique identifier attached to the handling chain for this handling instance.</param> /// <returns>Modified exception to pass to the next exceptionHandlerData in the chain.</returns> public Exception HandleException(Exception exception, Guid handlingInstanceId) { return(ReplaceException( ExceptionUtility.FormatExceptionMessage(ExceptionMessage, handlingInstanceId))); }