Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    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.
    1. COThe first Joel on Software article is from 2003, not long after people figured out what exception-safe actually was. The second one has little to do with exceptions, except pointing to the Chen article. The Raymond Chen article clearly demonstrates that Chen had no clue what he was talking about at the time (one hopes and expects he knows more of exception safety now). And, yes, that code is very likely wrong, but without knowing what it should do, and what the class invariants are, it's impossible to say. It is obvious that m_i might be incremented while m_j isn't.
      singulars
    2. COI'll carry on our discussion from my answer here. To both points 1 and 2 in the first article I say: "So what?". I don't *need* to know if an exception might be thrown, because I understand if it does somethings gone bad. If I'm in a position to handle it, I will, otherwise who cares? Let someone higher in the chain solve the problem. I have no loss here. The second article is pure bogus crap: "I have a dosomething() and cleanup(), if dosomething throws I won't clean up!" Well freaking duh, that's why you put things in containers that clean up *for you*. Hell now your code is even cleaner...
      singulars
    3. CO...because you don't even have to be explicit about cleaning up. I don't see the point to the third article. As far as I can tell it's just failed to recognize the purpose of exceptions. (Handle it if you can, and if not it'll automatically go to someone who can.) Much better than error codes (Better not forgot to handle it, or *nobody* will ever handle it.) As for your code snippet in your answer, I'm afraid I don't see the point. What exactly is wrong? If `SomeOtherMethod` throws an exception, *why would I want to continue?*
      singulars
 

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