Commit 81ce63c8 by Tobias Fuchs

dataflow_cpp: added specific exception raised if maximum number of queues is exceeded

parent d2400de3
......@@ -54,7 +54,13 @@ Queue::Queue(mtapi_uint_t priority, bool ordered) {
mtapi_job_hndl_t job = mtapi_job_get(TASKS_CPP_JOB, domain_id, &status);
assert(MTAPI_SUCCESS == status);
handle_ = mtapi_queue_create(MTAPI_QUEUE_ID_NONE, job, &attr, &status);
if (MTAPI_SUCCESS != status) {
if (status == MTAPI_SUCCESS) {
return;
} else if (status == MTAPI_ERR_QUEUE_LIMIT) {
EMBB_THROW(embb::base::ErrorException,
"mtapi::Queue could not be constructed, "
"maximum number of queues exceeded");
} else {
EMBB_THROW(embb::base::ErrorException,
"mtapi::Queue could not be constructed");
}
......
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 sign in to comment