diff options
author | zhangw <zhangw@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-15 23:26:37 +0000 |
---|---|---|
committer | zhangw <zhangw@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-15 23:26:37 +0000 |
commit | 54191a377b67a851dc03c754a23cb8aaca6b18b2 (patch) | |
tree | 3ecfcb7e0be56c06857e3faf607c85abb2988120 /ACE/ace/Assert.cpp | |
parent | a6b6f9642d622fb9e274ef1e34f3e848ed3ae9dc (diff) | |
download | ATCD-54191a377b67a851dc03c754a23cb8aaca6b18b2.tar.gz |
Creating a branch of ACE+TAO+CIAO for OCI RT 9734
Diffstat (limited to 'ACE/ace/Assert.cpp')
-rw-r--r-- | ACE/ace/Assert.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ACE/ace/Assert.cpp b/ACE/ace/Assert.cpp new file mode 100644 index 00000000000..c46d30793ab --- /dev/null +++ b/ACE/ace/Assert.cpp @@ -0,0 +1,24 @@ +// $Id$ + +#include "ace/Assert.h" +#include "ace/Log_Msg.h" + +ACE_RCSID(ace, Assert, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// The following ASSERT macro is courtesy of Alexandre Karev +// <akg@na47sun05.cern.ch>. +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 (); + + log->set (file, line, -1, error, log->restart (), + log->msg_ostream (), log->msg_callback ()); + + log->log (LM_ERROR, ACE_LIB_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), expression, -1); +} + +ACE_END_VERSIONED_NAMESPACE_DECL |