To end the execution of a program due to error or mistake.