title: How to manipulate SqlException message into user friendly message
body: <p>I want to obtain all the replaced values in the following exception from error message obtained on UI to display custom message up to a granular level</p>
  
  <blockquote>
    <p>The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_Parameter_Status". The conflict occurred in database "LIMS", table
    "dbo.Status", column 'StatusId'.</p>
    
    <p>The %ls statement conflicted with the %ls constraint "%.*ls". The conflict occurred in database "%.*ls", table "%.*ls"%ls%.*ls%ls.</p>
  </blockquote>
  
  <p>I can observe </p>
  
  <p><code>%ls</code> is being replaced by <code>UPDATE</code>, <code>FOREIGN KEY</code> etc.</p>
  
  <p>In C# I will be getting error message from which I want to extract the parts replaced by SQL Server. I will be maintaining <code>SqlErrors</code> in my library and will replace them with custom messages.</p>
  
  <p>Custom message I want to display
  eg. </p>
  
  <pre><code>string.Format("{0} failed!, incorrect value was supplied for {1} field", "UPDATE", "Status")
  </code></pre>