0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix framework a tiny bit

This commit is contained in:
Eliot Horowitz 2009-09-25 10:56:56 -04:00
parent 586252cffb
commit c9d513ffd3
2 changed files with 9 additions and 9 deletions

View File

@ -88,7 +88,7 @@ namespace mongo {
tc->run();
passes = true;
}
catch ( AssertionException * ae ){
catch ( MyAssertionException * ae ){
err << ae->ss.str();
delete( ae );
}
@ -312,8 +312,8 @@ namespace mongo {
#endif
}
AssertionException * MyAsserts::getBase(){
AssertionException * e = new AssertionException();
MyAssertionException * MyAsserts::getBase(){
MyAssertionException * e = new MyAssertionException();
e->ss << _file << ":" << _line << " " << _aexp << " != " << _bexp << " ";
return e;
}
@ -329,7 +329,7 @@ namespace mongo {
printLocation();
AssertionException * e = getBase();
MyAssertionException * e = getBase();
e->ss << a << " != " << b << endl;
log() << e->ss.str() << endl;
throw e;
@ -339,10 +339,10 @@ namespace mongo {
Result::cur->_asserts++;
if ( a == b )
return;
printLocation();
AssertionException * e = getBase();
MyAssertionException * e = getBase();
e->ss << a << " != " << b << endl;
log() << e->ss.str() << endl;
throw e;

View File

@ -135,9 +135,9 @@ namespace mongo {
void assert_fail( const char * exp , const char * file , unsigned line );
void fail( const char * exp , const char * file , unsigned line );
class AssertionException : boost::noncopyable {
class MyAssertionException : boost::noncopyable {
public:
AssertionException(){
MyAssertionException(){
ss << "assertion: ";
}
stringstream ss;
@ -159,7 +159,7 @@ namespace mongo {
private:
AssertionException * getBase();
MyAssertionException * getBase();
string _aexp;
string _bexp;