Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If the error codes can change from version to version, then no amount of work (or lack of it) is going to save you trouble of having to remap these somehow at some point. If you have exceptions for codes (or code ranges) then it's hardly going to be <em>much more</em> work than if you didn't have, when error codes do change (you're going to be rearranging what exceptions are thrown, just as you would have to be jiggling the messages around for one exception if you didn't have dedicated classes).</p> <p>Besides, in general practice, by .NET convention, you should create a dedicated exception class for specific exceptions that aren't aptly covered by BCL-provided exceptions (excluding use of the some in there that are meant for abstraction only).</p> <p>For some Microsoft input, consider <a href="http://msdn.microsoft.com/en-gb/library/vstudio/ms229014%28v=vs.100%29.aspx" rel="nofollow">this</a>:</p> <blockquote> <p>Applications and libraries should not use return codes to communicate errors.</p> </blockquote> <p>And <a href="http://msdn.microsoft.com/en-gb/library/vstudio/ms229021%28v=vs.100%29.aspx" rel="nofollow">this</a>:</p> <blockquote> <p>Consider throwing existing exceptions residing in the System namespaces instead of creating custom exception types.</p> </blockquote> <p>But, following the <a href="http://msdn.microsoft.com/en-us/library/vstudio/ms229014%28v=vs.100%29.aspx" rel="nofollow">Exception Design Guidelines</a>,</p> <blockquote> <p>[will] help ensure that you use the existing exceptions, where appropriate, and create new exceptions where they add value to your library.</p> </blockquote> <p>Stick to your guns.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload