diff options
author | Dwight <dmerriman@gmail.com> | 2008-09-03 16:43:00 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-09-03 16:43:00 -0400 |
commit | 8cac7e4dc4c1102b69598ba6b1e60df8d8e1dcdd (patch) | |
tree | d7a65a1cd57a9446c04903e268484eca65862adb /stdafx.h | |
parent | fd876a27f769b22bfe6cd48f45cf3c4e3704c9b7 (diff) | |
download | mongo-8cac7e4dc4c1102b69598ba6b1e60df8d8e1dcdd.tar.gz |
advertise new dbs for replication; handle user asserts on repl
Diffstat (limited to 'stdafx.h')
-rw-r--r-- | stdafx.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); |