diff options
author | Randolph Tan <ren@Randolphs-MacBook-Air.local> | 2012-03-01 20:14:51 -0500 |
---|---|---|
committer | Randolph <randolph@10gen.com> | 2012-03-02 08:16:08 -0500 |
commit | 372d940d6ec3f645e63c9d9a87541ca0db985b35 (patch) | |
tree | 0a2db2d7c9b6ce7eaa7e465d203eb489446f4d39 /src/mongo/scripting/sm_db.cpp | |
parent | 5d065652e1318dcab9ddaf54eaea763f7d8caf6a (diff) | |
download | mongo-372d940d6ec3f645e63c9d9a87541ca0db985b35.tar.gz |
SERVER-5163 Build failing on shard1.js test
Modified the test to bypass the invalid db name checking from the db shell constructor.
Also added a more helpful error message on error.
Diffstat (limited to 'src/mongo/scripting/sm_db.cpp')
-rw-r--r-- | src/mongo/scripting/sm_db.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/scripting/sm_db.cpp b/src/mongo/scripting/sm_db.cpp index aad7b724825..52c3b365fb3 100644 --- a/src/mongo/scripting/sm_db.cpp +++ b/src/mongo/scripting/sm_db.cpp @@ -517,8 +517,9 @@ namespace mongo { Convertor convertor( cx ); string dbName = convertor.toString( argv[1] ); - smuassert( cx, "invalid database name", - NamespaceString::validDBName( dbName ) ); + string msg = str::stream() << "[" << dbName << "] is not a " + << "valid database name"; + smuassert( cx, msg.c_str(), NamespaceString::validDBName( dbName ) ); assert( JS_SetProperty( cx , obj , "_mongo" , &(argv[0]) ) ); assert( JS_SetProperty( cx , obj , "_name" , &(argv[1]) ) ); |