title: How to raise an Exception and still continue the main code in Python
body: <p>Given the following simple example:</p>
  
  <pre><code>while True:
  
      readme = input("Write here something:")
  
      if readme == "":
  
          raise Exception("That was empty!")
  </code></pre>
  
  <p>(1) How can the main code / loop continue to work after an Exception has been thrown?  (2) And if we simultaneously run another thread, how can we catch the Exception in there?</p>
  
  <p>Edit: is it possible to do this without having a try/except block inside the loop?</p>