title: throw user defined exception message when an unregistered dependency is resolved
body: <p>I have 1 service like below</p>
  <pre><code>public interface IGopalSharma
  {
  
  }
  </code></pre>
  <p>Now, if I forgot the implementation of this interface IGopalSharma and use this service in constructor as below</p>
  <pre><code>private readonly IGopalSharma _gopalSharma;
  
  public ClientsController(IGopalSharma gopalSharma)
  {
      _gopalSharma = gopalSharma ?? throw new ArgumentNullException(
          &quot;An implementation of IGopalSharma must be provided&quot;);
  }
  </code></pre>
  <p>So I want to return this <code>&quot;An implementation of IGopalSharma must be provided&quot;</code> msg.</p>
  <p>but something different is coming.</p>
  <pre><code>System.InvalidOperationException: Unable to resolve service for type 'SAPI.Services.Interface.IGopalSharma' while attempting to activate 'SAPI.API.Controllers.ClientsController'.
     at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired)
     at lambda_method9(Closure , IServiceProvider , Object[] )
     at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.&lt;&gt;c__DisplayClass7_0.&lt;CreateActivator&gt;b__0(ControllerContext controllerContext)
     at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.&lt;&gt;c__DisplayClass6_0.&lt;CreateControllerFactory&gt;g__CreateController|0(ControllerContext controllerContext)
     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State&amp; next, Scope&amp; scope, Object&amp; state, Boolean&amp; isCompleted)
     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
  --- End of stack trace from previous location ---
     at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeFilterPipelineAsync&gt;g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
     at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
     at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
     at Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
     at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
     at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
     at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
     at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/88IUf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/88IUf.png" alt="enter image description here" /></a></p>
  <p>I want custom msg here. How can I do it?</p>