<human>:  Terminating a Python script
<bot>: Here is some code to terminating a Python script with error message "some error message"

sys.exit('some error message')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.