<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def onecmd(self, line):
 """Do not crash the entire program when a single command fails."""

        try:
            return cmd.Cmd.onecmd(self, line)
        except Exception as e:
            print("Critical error.", e)