better debugging when can't open streams

This commit is contained in:
Eliot Horowitz
2010-01-24 21:05:46 -05:00
parent 05d80f56d8
commit 5fa0d5e030
4 changed files with 15 additions and 2 deletions

View File

@@ -72,6 +72,15 @@ namespace mongo {
throw MsgAssertionException(msgid, msg);
}
void streamNotGood( int code , string msg , std::ios& myios ){
stringstream ss;
// errno might not work on all systems for streams
// if it doesn't for a system should deal with here
ss << msg << " stream invalie: " << OUTPUT_ERRNO;
throw UserException( code , ss.str() );
}
boost::mutex *Assertion::_mutex = new boost::mutex();
string Assertion::toString() {