Hi Leonardo,

Logger::fatal is used via the LOG_FATAL macro and it is used in some part of the code to ensure that the program behaves as we want. If not, we log a message via this macro and then it launches an assertion to abort the software execution.
Removing this code will not really affect the software but this could let pass some error we are able to detect.


Le 15 nov. 06 à 17:52, Leonardo José Reyes Diago a écrit :

Hello, i write to ask about this code:

void Logger::fatal(const std::string & className, const std::string & message, const std::string & filename, const std::string & line) {
       log(Fatal, className, message, filename, line);
       flush();
       assert(NULL && "fatal error");
}


in util/Logger.cpp

My question is: What is the funtion of assert, why is in this code. If i delete the assert line,
affects the program?
if someone can help.

Thanks


_______________________________________________
Wengophone-devel mailing list

_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to