/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
- namespace LinFu.AOP.Interfaces
- {
- /// <summary>
- /// Represents a type that can catch thrown exceptions.
- /// </summary>
- public interface IExceptionHandler
- {
- /// <summary>
- /// Determines whether or not an exception can be handled.
- /// </summary>
- /// <param name="exceptionHandlerInfo">The object that describes the exception being thrown.</param>
- /// <returns><c>True</c> if the exception can be handled by the current handler.</returns>
- bool CanCatch(IExceptionHandlerInfo exceptionHandlerInfo);
- /// <summary>
- /// Handles the exception specified in the <paramref name="exceptionHandlerInfo" /> instance.
- /// </summary>
- /// <param name="exceptionHandlerInfo">The object that describes the exception being thrown.</param>
- void Catch(IExceptionHandlerInfo exceptionHandlerInfo);
- }
- }