Assert.cpp

Go to the documentation of this file.
00001 // $Id: Assert.cpp 80826 2008-03-04 14:51:23Z wotte $
00002 
00003 #include "ace/Assert.h"
00004 #include "ace/Log_Msg.h"
00005 
00006 ACE_RCSID(ace, Assert, "$Id: Assert.cpp 80826 2008-03-04 14:51:23Z wotte $")
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_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 Tue Feb 2 17:18:38 2010 for ACE by  doxygen 1.4.7