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:
parent
586252cffb
commit
c9d513ffd3
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user