title: Raise an error and after that return a value in Python
body: <p>I want to raise an error and then return a value.</p>
  
  <pre><code>raise ValueError('Max Iter Reached')
  return x
  </code></pre>
  
  <p>And make both lines work.</p>
  
  <p>Now I found this question is stupid and I decided to print an error message.</p>
  
  <pre><code>print 'Max Iter Reached'
  return x
  </code></pre>