title: Difference between calling sys.exit() and throwing exception
body: <p>What is the difference between calling <code>sys.exit()</code> and throwing an exception in Python?</p>
  
  <p>Let's say I have a Python script which does the following:</p>
  
  <ol>
  <li>open a file</li>
  <li>read lines</li>
  <li>close it</li>
  </ol>
  
  <p>If the file doesn't exist or an <code>IOException</code> gets thrown at runtime, which of the options below makes more sense?</p>
  
  <ol>
  <li>no except/catch of the exception, if exception occurs, it fails out (which is expected behaviour anyway)</li>
  <li>except/catch the exception, logs the error message, throw customized exception by myself, fails out.</li>
  <li>in an <code>except IOException</code> block, exit with an error message e.g. <code>sys.exit("something is wrong")</code></li>
  </ol>
  
  <p>Does option 3 kill the process while 1 and 2 do not? What's the best way to handle the Python exceptions given that Python doesn't have a checked exception like Java (I am really a Java developer ^_^)?</p>