Files
TCPlayerbotCore/dep/ACE_wrappers/ace/Assert.cpp
T

26 lines
742 B
C++
Raw Normal View History

// $Id: Assert.cpp 80826 2008-03-04 14:51:23Z wotte $
2009-10-17 15:51:44 -07:00
#include "ace/Assert.h"
#include "ace/Log_Msg.h"
2009-10-17 15:51:44 -07:00
ACE_RCSID(ace, Assert, "$Id: Assert.cpp 80826 2008-03-04 14:51:23Z wotte $")
2009-10-17 15:51:44 -07:00
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
2009-10-17 15:51:44 -07:00
// The following ASSERT macro is courtesy of Alexandre Karev
// <[email protected]>.
void
__ace_assert(const char *file, int line, const ACE_TCHAR *expression)
{
int error = ACE_Log_Msg::last_error_adapter ();
ACE_Log_Msg *log = ACE_Log_Msg::instance ();
2009-10-17 15:51:44 -07:00
log->set (file, line, -1, error, log->restart (),
log->msg_ostream (), log->msg_callback ());
2009-10-17 15:51:44 -07:00
log->log (LM_ERROR, ACE_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), expression, -1);
}
2009-10-17 15:51:44 -07:00
ACE_END_VERSIONED_NAMESPACE_DECL
2009-02-17 20:07:49 -06:00