summaryrefslogtreecommitdiff
path: root/stdafx.h
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2008-09-03 16:43:00 -0400
committerDwight <dmerriman@gmail.com>2008-09-03 16:43:00 -0400
commit8cac7e4dc4c1102b69598ba6b1e60df8d8e1dcdd (patch)
treed7a65a1cd57a9446c04903e268484eca65862adb /stdafx.h
parentfd876a27f769b22bfe6cd48f45cf3c4e3704c9b7 (diff)
downloadmongo-8cac7e4dc4c1102b69598ba6b1e60df8d8e1dcdd.tar.gz
advertise new dbs for replication; handle user asserts on repl
Diffstat (limited to 'stdafx.h')
-rw-r--r--stdafx.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/stdafx.h b/stdafx.h
index 0612fa9f506..a74787d593f 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -53,7 +53,16 @@ inline void * ourrealloc(void *ptr, size_t size) {
// you can catch these
class AssertionException {
public:
- AssertionException() { }
+ const char *msg;
+ AssertionException() { msg = ""; }
+ virtual bool isUserAssertion() { return false; }
+};
+
+/* we use the same mechanism for bad things the user does -- which are really just errors */
+class UserAssertionException : public AssertionException {
+public:
+ UserAssertionException(const char *_msg) { msg = _msg; }
+ virtual bool isUserAssertion() { return true; }
};
void asserted(const char *msg, const char *file, unsigned line);