Assert.cpp

Go to the documentation of this file.
00001 // Assert.cpp,v 4.2 2006/01/11 19:01:35 jtc Exp
00002 
00003 #include "ace/Assert.h"
00004 #include "ace/Log_Msg.h"
00005 
00006 ACE_RCSID(ace, Assert, "Assert.cpp,v 4.2 2006/01/11 19:01:35 jtc Exp")
00007 
00008 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00009 
00010 // The following ASSERT macro is courtesy of Alexandre Karev
00011 // <akg@na47sun05.cern.ch>.
00012 void
00013 __ace_assert(const char *file, int line, const ACE_TCHAR *expression)
00014 {
00015   int error = ACE_Log_Msg::last_error_adapter ();
00016   ACE_Log_Msg *log = ACE_Log_Msg::instance ();
00017 
00018   log->set (file, line, -1, error, log->restart (),
00019             log->msg_ostream (), log->msg_callback ());
00020   
00021   log->log (LM_ERROR, ACE_LIB_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), expression, -1);
00022 }
00023 
00024 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:41:46 2006 for ACE by doxygen 1.3.6