title: How to throw error and exit with a custom message in python
body: <p>I've seen people suggesting sys.exit() in Python.
  My question is that, is there any other way to exit the execution of current script, I mean termination, with an error.</p>
  
  <p>Something like this:</p>
  
  <pre><code>sys.exit("You can not have three process at the same time.")
  </code></pre>
  
  <p>Currently my solution would be:</p>
  
  <pre><code>print("You can not have three process at the same time.")
  sys.exit()
  </code></pre>