/src/LinFu.AOP.Interfaces/IExceptionHandler.cs

http://github.com/philiplaureano/LinFu · C# · 21 lines · 8 code · 1 blank · 12 comment · 0 complexity · e06d41c4708b8cfd85994a6c7def3a80 MD5 · raw file

  1. namespace LinFu.AOP.Interfaces
  2. {
  3. /// <summary>
  4. /// Represents a type that can catch thrown exceptions.
  5. /// </summary>
  6. public interface IExceptionHandler
  7. {
  8. /// <summary>
  9. /// Determines whether or not an exception can be handled.
  10. /// </summary>
  11. /// <param name="exceptionHandlerInfo">The object that describes the exception being thrown.</param>
  12. /// <returns><c>True</c> if the exception can be handled by the current handler.</returns>
  13. bool CanCatch(IExceptionHandlerInfo exceptionHandlerInfo);
  14. /// <summary>
  15. /// Handles the exception specified in the <paramref name="exceptionHandlerInfo" /> instance.
  16. /// </summary>
  17. /// <param name="exceptionHandlerInfo">The object that describes the exception being thrown.</param>
  18. void Catch(IExceptionHandlerInfo exceptionHandlerInfo);
  19. }
  20. }