Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class FindExceptionInterceptor : IInterceptor
{
public void Intercept(IInvocation invocation)
{
try
{
invocation.Proceed();
}
catch (ClientException)
{
}
catch (ServiceException)
{
}
}
}
[ModuleDependency(typeof(EPiServer.Commerce.Initialization.InitializationModule))]
public class SiteInitialization : IConfigurableModule
{
public void ConfigureContainer(ServiceConfigurationContext context)
{
var proxyGenerator = new ProxyGenerator();
context.Container.Configure(c =>
{
c.For<CatalogContentClientConventions>().Use<CatalogContentClientConventions>().DecorateWith(t => proxyGenerator.CreateClassProxyWithTarget(t, new CrashInterceptor()));
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.