title: jupyter: how to stop execution on errors?
body: <p>The common way to defensively abort execution in python is to simply do something like:</p>
  
  <pre><code>if something_went_wrong:
      print("Error message: goodbye cruel world")
      exit(1)
  </code></pre>
  
  <p>However, this is not good practice when using <strong>jupyter notebook</strong>, as this seems to abort the kernel entirely, which is not always wanted. Is there are proper/better way in jupyter, besides hack-y inifinte loops?</p>