IErrorInfoBuilder.cs 811 B

1234567891011121314151617181920212223
  1. using System;
  2. namespace Abp.Web.Models
  3. {
  4. /// <summary>
  5. /// This interface is used to build <see cref="ErrorInfo"/> objects.
  6. /// </summary>
  7. public interface IErrorInfoBuilder
  8. {
  9. /// <summary>
  10. /// Creates a new instance of <see cref="ErrorInfo"/> using the given <paramref name="exception"/> object.
  11. /// </summary>
  12. /// <param name="exception">The exception object</param>
  13. /// <returns>Created <see cref="ErrorInfo"/> object</returns>
  14. ErrorInfo BuildForException(Exception exception);
  15. /// <summary>
  16. /// Adds an <see cref="IExceptionToErrorInfoConverter"/> object.
  17. /// </summary>
  18. /// <param name="converter">Converter</param>
  19. void AddExceptionConverter(IExceptionToErrorInfoConverter converter);
  20. }
  21. }