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

--stopOnError option to mongoimport SERVER-1133

This commit is contained in:
Mathias Stearn 2010-06-03 18:17:26 -04:00
parent a923513e69
commit a0ce62f1ea

View File

@ -142,6 +142,7 @@ public:
("drop", "drop collection first " )
("headerline","CSV,TSV only - use first line as headers")
("upsert", "insert or update objects that already exist" )
("stopOnError", "stop importing at first error rather than continuing" )
;
addPositionArg( "file" , 1 );
_type = JSON;
@ -260,6 +261,9 @@ public:
cout << "exception:" << e.what() << endl;
cout << buf << endl;
errors++;
if (hasParam("stopOnError"))
break;
}
num++;