Commit 3e0cdea6 authored by Micha Mueller's avatar Micha Mueller
Browse files

Rename error JD_INVALIDPARAMS --> JD_BADPARAMS

parent 7bfd5aab
......@@ -68,7 +68,7 @@ namespace DCDB {
typedef enum {
JD_OK, /**< Everything went fine. */
JD_JOBIDNOTFOUND, /**< The given JobId was not found in the data store. */
JD_INVALIDPARAMS, /**< The provided parameters are invalid. Either
JD_BADPARAMS, /**< The provided parameters are ill-formed. Either
because they are erroneous or incomplete. */
JD_PARSINGERROR, /**< Data retrieved from the data store could not be
parsed and a default value was returned instead.
......
......@@ -95,13 +95,13 @@ void JobDataStoreImpl::prepareInsert(uint64_t ttl) {
JDError JobDataStoreImpl::insertJob(JobData& jdata) {
/* Check if the input is valid and reasonable */
if (jdata.startTime.getRaw() == 0 || jdata.endTime.getRaw() == 0) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
if (jdata.startTime >= jdata.endTime) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
if (jdata.nodes.size() == 0) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
JDError error = JD_UNKNOWNERROR;
......@@ -217,13 +217,13 @@ JDError JobDataStoreImpl::insertSubmittedJob(JobId jid, UserId uid) {
JDError JobDataStoreImpl::updateJob(JobData& jdata) {
/* Check if the input is valid and reasonable */
if (jdata.startTime.getRaw() == 0 || jdata.endTime.getRaw() == 0) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
if (jdata.startTime >= jdata.endTime) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
if (jdata.nodes.size() == 0) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
JDError error = JD_UNKNOWNERROR;
......@@ -411,10 +411,10 @@ JDError JobDataStoreImpl::getJobsInIntervalExcl(std::list<JobData>& jobs,
TimeStamp intervalEnd) {
/* Check if the input is valid and reasonable */
if (intervalEnd.getRaw() == 0) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
if (intervalStart >= intervalEnd) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
JDError error = JD_UNKNOWNERROR;
......@@ -518,10 +518,10 @@ JDError JobDataStoreImpl::getJobsInIntervalIncl(std::list<JobData>& jobs,
TimeStamp intervalEnd) {
/* Check if the input is valid and reasonable */
if (intervalEnd.getRaw() == 0) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
if (intervalStart >= intervalEnd) {
return JD_INVALIDPARAMS;
return JD_BADPARAMS;
}
JDError error = JD_UNKNOWNERROR;
......
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