How to make Web API Stop working on occurance of specific exception
<p>In some scenarios I am getting exceptions in Startup.cs file.
So I want to catch that exceptions and do not show specific errors to Users.</p>

<p>I tried this:</p>

<p>I catch exceptions and throw as Custom exceptions, even though it shows stack-trace and all things into browser.</p>

<p>And if I left catch block empty then Web API still remains <strong>available (working).</strong></p>

<p>I want to pause or stop my service for this scenarios. </p>

<p>Please help me.</p>