Create error object when program exits with code != 0.