update error adding to list

This commit is contained in:
Dario 2019-11-29 09:35:36 +01:00
parent be63b39171
commit f212bba23d
2 changed files with 2 additions and 6 deletions

View File

@ -38,9 +38,7 @@ void ErrorManager::addError(Error* error)
std::list<Error*>* list = nullptr; std::list<Error*>* list = nullptr;
//printf("[ErrorManager::addError] error with function: %s, %s\n", error->getFunctionName(), error->getMessage()); //printf("[ErrorManager::addError] error with function: %s, %s\n", error->getFunctionName(), error->getMessage());
mLogging.error("[ErrorManager::addError] error with function: %s, %s", mLogging.error("[ErrorManager::addError] %s", error->getString());
std::string(error->getFunctionName()), std::string(error->getMessage())
);
if (it == mErrorsMap.end()) { if (it == mErrorsMap.end()) {
list = new std::list<Error *>; list = new std::list<Error *>;

View File

@ -57,9 +57,7 @@ ErrorList::~ErrorList()
void ErrorList::addError(Error* error) void ErrorList::addError(Error* error)
{ {
mLogging.error("[ErrorList::addError] error with function: %s, %s", mLogging.error("[ErrorList::addError] %s", error->getString());
std::string(error->getFunctionName()), std::string(error->getMessage())
);
mErrorStack.push(error); mErrorStack.push(error);
} }