check error_exit code