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.
You have to use import sys first
import sys
Then use sys.exit("your custom error message")
sys.exit("your custom error message")