Exclude FxCop DoNotPassLiteralsAsLocalizedParameters violations from exception instantiation or localize exception messages
<p>I get the DoNotPassLiteralsAsLocalizedParameters FxCop violation for both exception throwing lines in the below method code:</p>

<pre><code>public bool IsPageAccessible(string url, string documentId) {
    if (url == null) {
        throw new ArgumentNullException("url", @"url must not be null, use string.Empty if you don't care what the url is.");
    }

    if (documentId == null) {
        throw new ArgumentNullException("documentId", "documentId must not be null, use string.Empty if you don't care what the documentId is.");
    }
    return true;
}
</code></pre>

<p>It means:</p>

<blockquote>
  <p>fxcop     Globalization#CA1303    String
  literals that are embedded in source
  code are difficult to localize. Avoid
  passing string literals as arguments
  in circumstances where a localized
  string is generally expected. Most
  localized applications, for example,
  should localize string arguments that
  are passed to exception constructors.
  When creating an Exception instance,
  therefore, a string argument retrieved
  from a string table is more
  appropriate than a string literal.</p>
</blockquote>

<p>Reasoning:</p>

<p>I do not wish to localize the exception message. Having only English is fine. Even though we are building an API, English is known by all developers. And the exception message should not be shown to the visitor on a production server anyway.</p>

<p>Questions:</p>

<ul>
<li>Do you disagree with my reasoning about exception message localization? Why?</li>
<li>Is there a way to exclude this FxCop warning from all exception instantiation only? We do localize other parts of the API. Those parts which will have text visible to the end user. So we get a value from keeping the warning in those cases.</li>
<li>How do you think I should deal with this?</li>
</ul>
