Commit 468eb34e authored by Steffen Lackner's avatar Steffen Lackner
Browse files

[code] Output old job state in asserts

parent 7f7c6eb5
......@@ -646,7 +646,7 @@ void server_on_change_job_state(ServerData * data,
xbt_assert(data->nb_completed_jobs + data->nb_running_jobs <= data->nb_submitted_jobs);
break;
default:
xbt_assert(false, "Can only change the state of a submitted job to running or rejected");
xbt_assert(false, "Can only change the state of a submitted job to running or rejected. State was %s", job_state_to_string(job->state).c_str());
}
break;
case JobState::JOB_STATE_RUNNING:
......@@ -661,11 +661,11 @@ void server_on_change_job_state(ServerData * data,
xbt_assert(data->nb_completed_jobs + data->nb_running_jobs <= data->nb_submitted_jobs);
break;
default:
xbt_assert(false, "Can only change the state of a running job to completed (successfully, failed, and killed)");
xbt_assert(false, "Can only change the state of a running job to completed (successfully, failed, and killed). State was %s", job_state_to_string(job->state).c_str());
}
break;
default:
xbt_assert(false, "Can only change the state of a submitted or running job.");
xbt_assert(false, "Can only change the state of a submitted or running job. State was %s", job_state_to_string(job->state).c_str());
}
job->state = new_state;
job->kill_reason = message->kill_reason;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment