summaryrefslogtreecommitdiff
path: root/stdafx.cpp
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2008-02-10 16:28:48 -0500
committerDwight <dmerriman@gmail.com>2008-02-10 16:28:48 -0500
commit329020083a639d04c052a1a46d8c25d908d74d06 (patch)
treee46c4433c691ffce57d69a170a4327f2cdd6cdda /stdafx.cpp
parent43c52c96ad105efbe329b62ab7e54b0cb5e9f811 (diff)
downloadmongo-329020083a639d04c052a1a46d8c25d908d74d06.tar.gz
assertions etc.
Diffstat (limited to 'stdafx.cpp')
-rw-r--r--stdafx.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/stdafx.cpp b/stdafx.cpp
index c26ad91edc8..4b5a94a0188 100644
--- a/stdafx.cpp
+++ b/stdafx.cpp
@@ -12,3 +12,17 @@ struct MyAsserts {
}
} myassertsstdafx;
+
+#undef assert
+
+#undef yassert
+#include "assert.h"
+
+void sayDbContext();
+
+void asserted(const char *msg, const char *file, unsigned line) {
+ cout << "Assertion failure " << msg << endl;
+ cout << ' ' << file << ' ' << line << endl;
+ sayDbContext();
+ throw AssertionException();
+}