Skip to content

Instantly share code, notes, and snippets.

@straubt1
Created August 21, 2015 12:33
Show Gist options
  • Save straubt1/fe4af2fd39891606a6ec to your computer and use it in GitHub Desktop.
Save straubt1/fe4af2fd39891606a6ec to your computer and use it in GitHub Desktop.
AOPinIoC_ExceptionAspect
public class ExceptionAspect : Aspect
{
public override void ProcessInvocation(IInvocation invocation)
{
try
{
invocation.Proceed();
}
catch (Exception exception)
{
Console.WriteLine("Exception Intercepted: {0}", exception.Message);
throw;//re-throw
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment