It is better to keep exception types unified. That would minimize the number of
"catch" statements.
Change-Id: Id9e5bafef70c7ffb126a60c595505b644d596729
Signed-off-by: Marcin Lis <m.lis@samsung.com>
free(this->client);
free(this->user);
free(this->privilege);
- throw std::bad_alloc();
+ ThrowMsg(CynaraException::OutOfMemory,
+ std::string("Error in CynaraAdminPolicy allocation."));
}
this->result = static_cast<int>(operation);
free(this->user);
free(this->privilege);
free(this->result_extra);
- throw std::bad_alloc();
+ ThrowMsg(CynaraException::OutOfMemory,
+ std::string("Error in CynaraAdminPolicy allocation."));
}
}