Skip to content

Commit

Permalink
Remove unneeded exception when the getter already throws
Browse files Browse the repository at this point in the history
  • Loading branch information
generik0 committed Dec 15, 2020
1 parent 34b0d9f commit 0c04c83
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

namespace Castle.Windsor.Extensions.DependencyInjection.Scope
{
using System;

using Castle.MicroKernel.Context;
using Castle.MicroKernel.Lifestyle.Scoped;

internal class ExtensionContainerScopeAccessor : IScopeAccessor
{
public ILifetimeScope GetScope(CreationContext context)
{
return ExtensionContainerScopeCache.Current ?? throw new InvalidOperationException("No scope available");
return ExtensionContainerScopeCache.Current;
}

public void Dispose()
Expand Down

0 comments on commit 0c04c83

Please sign in to comment.