IExceptionToErrorInfoConverter.cs 768 B

1234567891011121314151617181920212223
  1. using System;
  2. namespace Abp.Web.Models
  3. {
  4. /// <summary>
  5. /// This interface can be implemented to convert an <see cref="Exception"/> object to an <see cref="ErrorInfo"/> object.
  6. /// Implements Chain Of Responsibility pattern.
  7. /// </summary>
  8. public interface IExceptionToErrorInfoConverter
  9. {
  10. /// <summary>
  11. /// Next converter. If this converter decide this exception is not known, it can call Next.Convert(...).
  12. /// </summary>
  13. IExceptionToErrorInfoConverter Next { set; }
  14. /// <summary>
  15. /// Converter method.
  16. /// </summary>
  17. /// <param name="exception">The exception</param>
  18. /// <returns>Error info or null</returns>
  19. ErrorInfo Convert(Exception exception);
  20. }
  21. }