title: Print error to screen but continue code execution
body: <p>I have some code that iterates through a series of URLs. If there is an error in my code because one of the URLs does not contain a valid JSON body, I want the error generated to be printed to screen, but then the code moves onto the next iteration. A simple version of my code is:</p>
  
  <pre><code>for a in myurls:
  
      try:
  
          #mycode
  
      except Exception as exc:
  
          print traceback.format_exc()
          print exc
          pass
  </code></pre>
  
  <p>However this prints the error to screen and ends execution of the code. Is there a way I can get the error to continue execution by moving to the next iteration of my 'for' loop?</p>