summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-12-28 16:43:43 -0500
committerEliot Horowitz <eliot@10gen.com>2009-12-28 16:43:43 -0500
commit0ab8149a8e9e900b63ee28b9590a249578339376 (patch)
tree564a5c516b7c308964b79ea761e4800efe26d252 /tools
parent95137f262c2a57831dccf058428a2f64e900496e (diff)
downloadmongo-0ab8149a8e9e900b63ee28b9590a249578339376.tar.gz
uassert/massert take error code SERVER-112
Diffstat (limited to 'tools')
-rw-r--r--tools/dump.cpp2
-rw-r--r--tools/import.cpp2
-rw-r--r--tools/restore.cpp4
-rw-r--r--tools/sniffer.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/tools/dump.cpp b/tools/dump.cpp
index 6fe8ae2234c..201cfc93ead 100644
--- a/tools/dump.cpp
+++ b/tools/dump.cpp
@@ -39,7 +39,7 @@ public:
ofstream out;
out.open( outputFile.string().c_str() , ios_base::out | ios_base::binary );
- uassert( "couldn't open file" , out.good() );
+ uassert( 10262 , "couldn't open file" , out.good() );
ProgressMeter m( conn( true ).count( coll.c_str() , BSONObj() , Option_SlaveOk ) );
diff --git a/tools/import.cpp b/tools/import.cpp
index 7a05cf095c8..9b43e4fa7fc 100644
--- a/tools/import.cpp
+++ b/tools/import.cpp
@@ -204,7 +204,7 @@ public:
char line[ (1024 * 1024 * 4) + 128];
while ( *in ){
in->getline( line , BUF_SIZE );
- uassert( "unknown error reading file" , ( in->rdstate() & ios_base::badbit ) == 0 );
+ uassert( 10263 , "unknown error reading file" , ( in->rdstate() & ios_base::badbit ) == 0 );
log(1) << "got line:" << line << endl;
char * buf = line;
diff --git a/tools/restore.cpp b/tools/restore.cpp
index 82dd32743a0..19e3a26a9d3 100644
--- a/tools/restore.cpp
+++ b/tools/restore.cpp
@@ -151,7 +151,7 @@ public:
if ( size >= BUF_SIZE ){
cerr << "got an object of size: " << size << " terminating..." << endl;
}
- uassert( "invalid object size" , size < BUF_SIZE );
+ uassert( 10264 , "invalid object size" , size < BUF_SIZE );
file.read( buf + 4 , size - 4 );
@@ -166,7 +166,7 @@ public:
free( buf );
- uassert( "counts don't match" , m.done() == fileLength );
+ uassert( 10265 , "counts don't match" , m.done() == fileLength );
out() << "\t " << m.hits() << " objects" << endl;
}
};
diff --git a/tools/sniffer.cpp b/tools/sniffer.cpp
index 26830d7d29d..9590d8fc8e9 100644
--- a/tools/sniffer.cpp
+++ b/tools/sniffer.cpp
@@ -370,8 +370,8 @@ int main(int argc, char **argv){
} else if ( arg == string( "--forward" ) ) {
forwardAddress = args[ ++i ];
} else if ( arg == string( "--source" ) ) {
- uassert( "can't use --source twice" , source == false );
- uassert( "source needs more args" , args.size() > i + 2);
+ uassert( 10266 , "can't use --source twice" , source == false );
+ uassert( 10267 , "source needs more args" , args.size() > i + 2);
source = true;
replay = ( args[ ++i ] == string( "FILE" ) );
if ( replay )