#include "../db/lasterror.h"
Go to the source code of this file.
Classes | |
class | mongo::AssertionCount |
class | mongo::AssertionException |
class | mongo::DBException |
struct | mongo::ExceptionInfo |
class | mongo::MsgAssertionException |
class | mongo::UserException |
Namespaces | |
namespace | mongo |
Defines | |
#define | assert MONGO_assert |
#define | BOOST_CHECK_EXCEPTION MONGO_BOOST_CHECK_EXCEPTION |
#define | dassert MONGO_dassert |
#define | DESTRUCTOR_GUARD MONGO_DESTRUCTOR_GUARD |
#define | massert MONGO_massert |
#define | MONGO_assert(_Expression) (void)( (!!(_Expression)) || (mongo::asserted(#_Expression, __FILE__, __LINE__), 0) ) |
#define | MONGO_BOOST_CHECK_EXCEPTION(expression) |
#define | MONGO_dassert(x) |
#define | MONGO_DESTRUCTOR_GUARD(expression) |
#define | MONGO_massert(msgid, msg, expr) (void)( (!!(expr)) || (mongo::msgasserted(msgid, msg), 0) ) |
#define | MONGO_uassert(msgid, msg, expr) (void)( (!!(expr)) || (mongo::uasserted(msgid, msg), 0) ) |
#define | MONGO_wassert(_Expression) (void)( (!!(_Expression)) || (mongo::wasserted(#_Expression, __FILE__, __LINE__), 0) ) |
#define | uassert MONGO_uassert |
#define | wassert MONGO_wassert |
Enumerations | |
enum | { mongo::ASSERT_ID_DUPKEY = 11000 } |
enum | mongo::CommonErrorCodes { mongo::DatabaseDifferCaseCode = 13297, mongo::StaleConfigInContextCode = 13388 } |
Functions | |
void | mongo::asserted (const char *msg, const char *file, unsigned line) |
void | mongo::assertStreamGood (unsigned msgid, string msg, std::ios &myios) |
string | mongo::demangleName (const type_info &typeinfo) |
void | mongo::msgasserted (int msgid, string msg) |
void | mongo::msgasserted (int msgid, const char *msg) |
void | mongo::msgassertedNoTrace (int msgid, const string &msg) |
void | mongo::msgassertedNoTrace (int msgid, const char *msg) |
void | mongo::streamNotGood (int code, string msg, std::ios &myios) |
void | mongo::uassert_nothrow (const char *msg) |
void | mongo::uasserted (int msgid, string msg) |
void | mongo::uasserted (int msgid, const char *msg) |
void | mongo::wasserted (const char *msg, const char *file, unsigned line) |
Variables | |
AssertionCount | mongo::assertionCount |
#define assert MONGO_assert |
Definition at line 146 of file assert_util.h.
#define BOOST_CHECK_EXCEPTION MONGO_BOOST_CHECK_EXCEPTION |
Definition at line 192 of file assert_util.h.
#define dassert MONGO_dassert |
Definition at line 172 of file assert_util.h.
#define DESTRUCTOR_GUARD MONGO_DESTRUCTOR_GUARD |
Definition at line 204 of file assert_util.h.
#define massert MONGO_massert |
Definition at line 162 of file assert_util.h.
#define MONGO_assert | ( | _Expression | ) | (void)( (!!(_Expression)) || (mongo::asserted(#_Expression, __FILE__, __LINE__), 0) ) |
Definition at line 145 of file assert_util.h.
#define MONGO_BOOST_CHECK_EXCEPTION | ( | expression | ) |
try { \ expression; \ } catch ( const std::exception &e ) { \ stringstream ss; \ ss << "caught boost exception: " << e.what(); \ msgasserted( 13294 , ss.str() ); \ } catch ( ... ) { \ massert( 10437 , "unknown boost failed" , false ); \ }
Definition at line 193 of file assert_util.h.
#define MONGO_dassert | ( | x | ) |
Definition at line 170 of file assert_util.h.
#define MONGO_DESTRUCTOR_GUARD | ( | expression | ) |
try { \ expression; \ } catch ( const std::exception &e ) { \ problem() << "caught exception (" << e.what() << ") in destructor (" << __FUNCTION__ << ")" << endl; \ } catch ( ... ) { \ problem() << "caught unknown exception in destructor (" << __FUNCTION__ << ")" << endl; \ }
Definition at line 205 of file assert_util.h.
#define MONGO_massert | ( | msgid, | |||
msg, | |||||
expr | ) | (void)( (!!(expr)) || (mongo::msgasserted(msgid, msg), 0) ) |
Definition at line 161 of file assert_util.h.
#define MONGO_uassert | ( | msgid, | |||
msg, | |||||
expr | ) | (void)( (!!(expr)) || (mongo::uasserted(msgid, msg), 0) ) |
Definition at line 149 of file assert_util.h.
#define MONGO_wassert | ( | _Expression | ) | (void)( (!!(_Expression)) || (mongo::wasserted(#_Expression, __FILE__, __LINE__), 0) ) |
Definition at line 153 of file assert_util.h.
#define uassert MONGO_uassert |
Definition at line 150 of file assert_util.h.
#define wassert MONGO_wassert |
Definition at line 154 of file assert_util.h.