Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="https://blogs.msdn.microsoft.com/ericlippert/2008/09/10/vexing-exceptions/" rel="noreferrer">Eric Lippert says</a> there are 4 kinds of exceptions.</p> <ul> <li>Fatal exceptions are not your fault, you cannot prevent them, and you cannot sensibly clean up from them.</li> <li>Boneheaded exceptions are your own darn fault, you could have prevented them and therefore they are bugs in your code.</li> <li>Vexing exceptions are the result of unfortunate design decisions. Vexing exceptions are thrown in a completely non-exceptional circumstance, and therefore must be caught and handled all the time.</li> <li>And finally, exogenous exceptions appear to be somewhat like vexing exceptions except that they are not the result of unfortunate design choices. Rather, they are the result of untidy external realities impinging upon your beautiful, crisp program logic.</li> </ul> <p>Your constructor should never throw a fatal exception on its own, but code it executes may cause a fatal exception. Something like "out of memory" isn't something you can control, but if it occurs in a constructor, hey, it happens.</p> <p>Boneheaded exceptions should never occur in any of your code, so they're right out.</p> <p>Vexing exceptions (the example is <code>Int32.Parse()</code>) shouldn't be thrown by constructors, because they don't have non-exceptional circumstances.</p> <p>Finally, exogenous exceptions should be avoided, but if you're doing something in your constructor that depends on external circumstances (like the network or filesystem), it would be appropriate to throw an exception.</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. 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.
    3. VO
      singulars
      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