public static RestExceptionRepackagingRegistrar Configure(Action <RestExceptionConfiguration> config)
        {
            var configurer = new RestExceptionConfiguration();

            var repackagers =
                AppDomainAssemblyTypeScanner.TypesOf <IExceptionRepackager>(ScanMode.ExcludeNancy);

            repackagers.ToList().ForEach(
                x => configurer.WithRepackager((IExceptionRepackager)Activator.CreateInstance(x)));

            configurer.WithDefault(new InternalServerExceptionRepackager());

            config(configurer);

            return(new RestExceptionRepackagingRegistrar(configurer));
        }
 public RestExceptionRepackagingRegistrar(RestExceptionConfiguration config)
 {
     _config = config;
 }