title: In what languages or environments will a program NOT be in a well-defined (or stable) state after an exception is thrown?
body: <p>I'm learning Objective-C from the book "<a href="https://rads.stackoverflow.com/amzn/click/com/0321967607" rel="nofollow noreferrer" rel="nofollow noreferrer">Programming in Objective-C</a>" and find myself comparing it to Java. They are obviously very different languages, but the similarities are striking. Near the end of chapter 9 the author issues the following statement;</p>
  
  <blockquote>
    <p>It is strongly recommended that if you catch an exception you only do
    so with the intention of cleaning up and terminating your application.
    Why? Because Apple <strong>does not guarantee that your application will be in
    a well-defined state for continuing program execution once an
    exception is thrown.</strong></p>
  </blockquote>
  
  <p>This is very different from Java, where depending on the exception itself, you <em>can</em> continue program execution (eg: if you try opening a configuration file, but get an exception of "File not found", you can select some default values and continue without issues). I believe the same is true for C#/.NET. Probably for python too, but I'm no authority.</p>
  
  <p>I'm <strong><em>guessing</em></strong> that since Objective-C isn't running on some framework/runtime-environment, Apple can't make any guarantees about program state after an exception is thrown. But that still feels weird since, it defeats one of the biggest selling points of OOP (to isolating issues from propagating unchecked) i.e. if your code catches an exception (barring the object that threw the exception), the rest of your program should be fine.</p>
  
  <p>Without knowing how Apple's Objective-C works underneath, I don't think it will be easy to puzzle out. This got me wondering;</p>
  
  <p>From an academic perspective (and simple curiosity) - In what modern OOP languages+environments will an application be in a potentially unstable state after an exception is thrown?</p>